home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 10 / BBS In A Box Volume X (AMUG) (January 1994).bin / Files / Prog / A / add images.cpt / Result.c < prev    next >
MacBinary  |  1989-06-22  |  19.1 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: Result.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Thu Jun 22 18:42:52 1989, modified Thu Jun 22 18:42:52 1989, creator Think C, type ASCII, 19038 bytes "Result.c" , at 0x4ade 348 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 52 65 73 75 6c 74 | 2e 63 00 00 00 00 00 00 |..Result|.c......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 4a 5e 00 | 00 01 5c a0 c7 1b ec a0 |.....J^.|..\.....|
|00000060| c7 1b ec 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f8 5f 00 00 |........|....._..|
|00000080| 2f 2a 20 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |/* =====|========|
|00000090| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000a0| 3d 3d 3d 3d 3d 3d 0d 0d | 46 69 6c 65 3a 20 52 65 |======..|File: Re|
|000000b0| 73 75 6c 74 2e 63 0d 46 | 75 6e 63 74 69 6f 6e 3a |sult.c.F|unction:|
|000000c0| 20 48 61 6e 64 6c 65 20 | 61 6c 6c 20 6f 70 65 72 | Handle |all oper|
|000000d0| 61 74 69 6f 6e 73 20 66 | 6f 72 20 74 68 69 73 20 |ations f|or this |
|000000e0| 77 69 6e 64 6f 77 0d 48 | 69 73 74 6f 72 79 3a 20 |window.H|istory: |
|000000f0| 34 2f 32 37 2f 38 39 20 | 4f 72 69 67 69 6e 61 6c |4/27/89 |Original|
|00000100| 20 62 79 20 50 72 6f 74 | 6f 74 79 70 65 72 2e 0d | by Prot|otyper..|
|00000110| 0d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.=======|========|
|00000120| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000130| 3d 3d 20 2a 2f 0d 0d 23 | 69 6e 63 6c 75 64 65 20 |== */..#|include |
|00000140| 22 52 65 73 75 6c 74 2e | 68 22 0d 23 69 6e 63 6c |"Result.|h".#incl|
|00000150| 75 64 65 20 22 70 69 78 | 5f 69 6f 2e 68 22 0d 23 |ude "pix|_io.h".#|
|00000160| 69 6e 63 6c 75 64 65 20 | 3c 43 6f 6c 6f 72 54 6f |include |<ColorTo|
|00000170| 6f 6c 62 6f 78 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |olbox.h>|.#includ|
|00000180| 65 20 3c 49 4d 35 70 72 | 6f 74 6f 73 2e 68 3e 0d |e <IM5pr|otos.h>.|
|00000190| 0d 57 69 6e 64 6f 77 50 | 74 72 20 52 65 73 75 6c |.WindowP|tr Resul|
|000001a0| 74 5f 57 69 6e 64 6f 77 | 3b 09 2f 2a 20 57 69 6e |t_Window|;./* Win|
|000001b0| 64 6f 77 20 70 6f 69 6e | 74 65 72 20 2d 2d 20 67 |dow poin|ter -- g|
|000001c0| 6c 6f 62 61 6c 20 76 61 | 72 69 61 62 6c 65 20 2a |lobal va|riable *|
|000001d0| 2f 0d 52 65 63 74 20 72 | 65 73 75 6c 74 5f 72 65 |/.Rect r|esult_re|
|000001e0| 63 74 3b 09 09 09 09 2f | 2a 20 74 6f 70 2f 62 6f |ct;..../|* top/bo|
|000001f0| 74 74 6f 6d 2f 6c 65 66 | 74 2f 72 69 67 68 74 20 |ttom/lef|t/right |
|00000200| 63 6f 6f 72 64 73 20 6f | 66 20 63 75 72 72 65 6e |coords o|f curren|
|00000210| 74 20 72 65 73 75 6c 74 | 20 69 6d 61 67 65 20 2a |t result| image *|
|00000220| 2f 0d 73 74 61 74 69 63 | 20 73 68 6f 72 74 20 6f |/.static| short o|
|00000230| 66 66 5f 74 6f 70 2c 20 | 6f 66 66 5f 6c 65 66 74 |ff_top, |off_left|
|00000240| 3b 09 2f 2a 20 6f 66 66 | 73 65 74 73 20 6f 6e 20 |;./* off|sets on |
|00000250| 74 68 65 20 77 69 6e 64 | 6f 77 20 66 72 6f 6d 20 |the wind|ow from |
|00000260| 73 63 72 6f 6c 6c 69 6e | 67 20 2a 2f 0d 0d 65 78 |scrollin|g */..ex|
|00000270| 74 65 72 6e 20 73 68 6f | 72 74 20 70 69 78 5f 7a |tern sho|rt pix_z|
|00000280| 6f 6f 6d 3b 0d 65 78 74 | 65 72 6e 20 50 61 6c 65 |oom;.ext|ern Pale|
|00000290| 74 74 65 48 61 6e 64 6c | 65 20 6d 79 70 61 6c 65 |tteHandl|e mypale|
|000002a0| 74 74 65 3b 0d 65 78 74 | 65 72 6e 20 52 47 42 43 |tte;.ext|ern RGBC|
|000002b0| 6f 6c 6f 72 20 42 6c 61 | 63 6b 52 47 42 2c 20 77 |olor Bla|ckRGB, w|
|000002c0| 68 69 74 65 52 47 42 2c | 20 67 72 61 79 52 47 42 |hiteRGB,| grayRGB|
|000002d0| 3b 0d 0d 73 74 61 74 69 | 63 20 53 74 72 32 35 35 |;..stati|c Str255|
|000002e0| 20 66 69 6c 65 6e 61 6d | 65 3b 0d 0d 50 69 63 48 | filenam|e;..PicH|
|000002f0| 61 6e 64 6c 65 20 72 65 | 73 75 6c 74 5f 70 69 63 |andle re|sult_pic|
|00000300| 3b 0d 43 47 72 61 66 50 | 74 72 20 72 65 73 75 6c |;.CGrafP|tr resul|
|00000310| 74 5f 62 6d 61 70 3b 0d | 0d 73 74 61 74 69 63 20 |t_bmap;.|.static |
|00000320| 76 6f 69 64 20 64 72 61 | 77 5f 72 65 73 75 6c 74 |void dra|w_result|
|00000330| 28 20 76 6f 69 64 20 29 | 3b 0d 0d 73 74 61 74 69 |( void )|;..stati|
|00000340| 63 20 76 6f 69 64 20 48 | 61 6e 64 6c 65 56 53 63 |c void H|andleVSc|
|00000350| 72 6f 6c 6c 42 61 72 20 | 28 73 68 6f 72 74 20 63 |rollBar |(short c|
|00000360| 6f 64 65 2c 20 73 68 6f | 72 74 20 53 74 61 72 74 |ode, sho|rt Start|
|00000370| 2c 20 73 68 6f 72 74 20 | 53 74 6f 70 2c 0d 09 09 |, short |Stop,...|
|00000380| 09 09 09 09 09 20 20 73 | 68 6f 72 74 20 49 6e 63 |..... s|hort Inc|
|00000390| 72 65 6d 65 6e 74 2c 20 | 73 68 6f 72 74 20 4c 49 |rement, |short LI|
|000003a0| 6e 63 72 65 6d 65 6e 74 | 2c 0d 09 09 09 09 09 09 |ncrement|,.......|
|000003b0| 09 20 20 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |. Contr|olHandle|
|000003c0| 20 74 68 65 43 6f 6e 74 | 72 6f 6c 2c 20 50 6f 69 | theCont|rol, Poi|
|000003d0| 6e 74 20 6d 79 50 74 29 | 3b 0d 0d 73 74 61 74 69 |nt myPt)|;..stati|
|000003e0| 63 20 76 6f 69 64 20 48 | 61 6e 64 6c 65 48 53 63 |c void H|andleHSc|
|000003f0| 72 6f 6c 6c 42 61 72 20 | 28 73 68 6f 72 74 20 63 |rollBar |(short c|
|00000400| 6f 64 65 2c 20 73 68 6f | 72 74 20 53 74 61 72 74 |ode, sho|rt Start|
|00000410| 2c 20 73 68 6f 72 74 20 | 53 74 6f 70 2c 0d 09 09 |, short |Stop,...|
|00000420| 09 09 09 09 09 20 20 73 | 68 6f 72 74 20 49 6e 63 |..... s|hort Inc|
|00000430| 72 65 6d 65 6e 74 2c 20 | 73 68 6f 72 74 20 4c 49 |rement, |short LI|
|00000440| 6e 63 72 65 6d 65 6e 74 | 2c 0d 09 09 09 09 09 09 |ncrement|,.......|
|00000450| 09 20 20 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |. Contr|olHandle|
|00000460| 20 74 68 65 43 6f 6e 74 | 72 6f 6c 2c 20 50 6f 69 | theCont|rol, Poi|
|00000470| 6e 74 20 6d 79 50 74 29 | 3b 0d 0d 73 74 61 74 69 |nt myPt)|;..stati|
|00000480| 63 20 76 6f 69 64 20 44 | 6f 5f 41 5f 53 63 72 6f |c void D|o_A_Scro|
|00000490| 6c 6c 42 61 72 20 28 73 | 68 6f 72 74 20 63 6f 64 |llBar (s|hort cod|
|000004a0| 65 2c 20 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |e, Contr|olHandle|
|000004b0| 20 74 68 65 43 6f 6e 74 | 72 6f 6c 2c 20 50 6f 69 | theCont|rol, Poi|
|000004c0| 6e 74 20 6d 79 50 74 29 | 3b 0d 0d 0d 0d 2f 2a 20 |nt myPt)|;..../* |
|000004d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000004e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000004f0| 2a 2a 2a 20 2a 2f 0d 2f | 2a 20 54 68 65 73 65 20 |*** */./|* These |
|00000500| 61 72 65 20 74 68 65 20 | 6f 74 68 65 72 20 69 6e |are the |other in|
|00000510| 63 6c 75 64 65 73 20 66 | 6f 72 20 67 65 6e 65 72 |cludes f|or gener|
|00000520| 61 6c 20 72 6f 75 74 69 | 6e 65 73 20 2a 2f 0d 0d |al routi|nes */..|
|00000530| 23 69 6e 63 6c 75 64 65 | 20 3c 53 74 72 69 6e 67 |#include| <String|
|00000540| 73 2e 68 3e 0d 65 78 74 | 65 72 6e 20 63 68 61 72 |s.h>.ext|ern char|
|00000550| 20 2a 73 74 72 63 70 79 | 20 28 53 74 72 32 35 35 | *strcpy| (Str255|
|00000560| 20 2a 2c 20 63 68 61 72 | 20 2a 29 3b 09 2f 2a 20 | *, char| *);./* |
|00000570| 4c 53 43 20 73 74 72 69 | 6e 67 20 70 72 6f 74 6f |LSC stri|ng proto|
|00000580| 74 79 70 65 20 2a 2f 0d | 0d 2f 2a 20 2a 2a 2a 2a |type */.|./* ****|
|00000590| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000005a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 20 |********|******* |
|000005b0| 2a 2f 0d 0d 23 64 65 66 | 69 6e 65 20 20 20 20 20 |*/..#def|ine |
|000005c0| 20 54 52 55 45 20 20 20 | 31 0d 23 64 65 66 69 6e | TRUE |1.#defin|
|000005d0| 65 20 20 20 20 20 20 46 | 41 4c 53 45 20 20 30 0d |e F|ALSE 0.|
|000005e0| 23 64 65 66 69 6e 65 20 | 20 20 20 20 20 4e 49 4c |#define | NIL|
|000005f0| 20 20 20 20 30 0d 0d 2f | 2a 20 2a 2a 2a 2a 2a 2a | 0../|* ******|
|00000600| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000610| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 20 2a 2f |********|***** */|
|00000620| 0d 0d 2f 2a 20 53 63 72 | 6f 6c 6c 62 61 72 20 49 |../* Scr|ollbar I|
|00000630| 44 20 2a 2f 0d 23 64 65 | 66 69 6e 65 09 49 5f 56 |D */.#de|fine.I_V|
|00000640| 65 72 74 69 63 61 6c 5f | 53 63 72 6f 6c 6c 5f 62 |ertical_|Scroll_b|
|00000650| 61 72 20 09 32 39 0d 2f | 2a 20 53 63 72 6f 6c 6c |ar .29./|* Scroll|
|00000660| 62 61 72 20 49 44 20 2a | 2f 0d 23 64 65 66 69 6e |bar ID *|/.#defin|
|00000670| 65 09 49 5f 48 6f 72 69 | 7a 5f 53 63 72 6f 6c 6c |e.I_Hori|z_Scroll|
|00000680| 5f 62 61 72 20 09 32 38 | 0d 0d 23 64 65 66 69 6e |_bar .28|..#defin|
|00000690| 65 20 6d 69 6e 5f 73 63 | 72 6f 6c 6c 20 31 0d 23 |e min_sc|roll 1.#|
|000006a0| 64 65 66 69 6e 65 20 6d | 61 78 5f 73 63 72 6f 6c |define m|ax_scrol|
|000006b0| 6c 20 31 30 30 0d 23 64 | 65 66 69 6e 65 20 73 6d |l 100.#d|efine sm|
|000006c0| 61 6c 6c 5f 73 74 65 70 | 20 31 0d 23 64 65 66 69 |all_step| 1.#defi|
|000006d0| 6e 65 20 6c 61 72 67 65 | 5f 73 74 65 70 20 31 30 |ne large|_step 10|
|000006e0| 0d 0d 73 74 61 74 69 63 | 20 52 65 63 74 20 74 65 |..static| Rect te|
|000006f0| 6d 70 52 65 63 74 2c 20 | 74 65 6d 70 32 52 65 63 |mpRect, |temp2Rec|
|00000700| 74 3b 09 2f 2a 20 54 65 | 6d 70 6f 72 61 72 79 20 |t;./* Te|mporary |
|00000710| 72 65 63 74 61 6e 67 6c | 65 20 2a 2f 0d 73 74 61 |rectangl|e */.sta|
|00000720| 74 69 63 20 73 68 6f 72 | 74 20 49 6e 64 65 78 3b |tic shor|t Index;|
|00000730| 09 09 09 2f 2a 20 46 6f | 72 20 6c 6f 6f 70 69 6e |.../* Fo|r loopin|
|00000740| 67 20 2a 2f 0d 73 74 61 | 74 69 63 20 43 6f 6e 74 |g */.sta|tic Cont|
|00000750| 72 6f 6c 48 61 6e 64 6c | 65 20 43 74 72 6c 48 61 |rolHandl|e CtrlHa|
|00000760| 6e 64 6c 65 3b 09 2f 2a | 20 43 6f 6e 74 72 6f 6c |ndle;./*| Control|
|00000770| 20 68 61 6e 64 6c 65 20 | 2a 2f 0d 73 74 61 74 69 | handle |*/.stati|
|00000780| 63 20 43 6f 6e 74 72 6f | 6c 48 61 6e 64 6c 65 20 |c Contro|lHandle |
|00000790| 53 63 72 6f 6c 6c 48 48 | 61 6e 64 6c 65 2c 20 53 |ScrollHH|andle, S|
|000007a0| 63 72 6f 6c 6c 56 48 61 | 6e 64 6c 65 3b 09 2f 2a |crollVHa|ndle;./*|
|000007b0| 20 53 63 72 6f 6c 6c 69 | 6e 67 20 43 6f 6e 74 72 | Scrolli|ng Contr|
|000007c0| 6f 6c 2a 2f 0d 73 74 61 | 74 69 63 20 53 74 72 32 |ol*/.sta|tic Str2|
|000007d0| 35 35 20 73 54 65 6d 70 | 3b 09 09 2f 2a 20 47 65 |55 sTemp|;../* Ge|
|000007e0| 74 20 74 65 78 74 20 65 | 6e 74 65 72 65 64 2c 20 |t text e|ntered, |
|000007f0| 74 65 6d 70 20 68 6f 6c | 64 69 6e 67 20 2a 2f 0d |temp hol|ding */.|
|00000800| 73 74 61 74 69 63 20 4f | 53 45 72 72 20 4d 79 45 |static O|SErr MyE|
|00000810| 72 72 3b 09 09 09 2f 2a | 20 47 65 6e 65 72 61 6c |rr;.../*| General|
|00000820| 20 4f 53 20 65 72 72 6f | 72 20 72 65 74 75 72 6e | OS erro|r return|
|00000830| 20 2a 2f 0d 73 74 61 74 | 69 63 20 43 6f 6e 74 72 | */.stat|ic Contr|
|00000840| 6f 6c 48 61 6e 64 6c 65 | 20 43 5f 56 65 72 74 69 |olHandle| C_Verti|
|00000850| 63 61 6c 5f 53 63 72 6f | 6c 6c 5f 62 61 72 3b 09 |cal_Scro|ll_bar;.|
|00000860| 2f 2a 20 53 63 72 6f 6c | 6c 20 62 61 72 20 20 43 |/* Scrol|l bar C|
|00000870| 6f 6e 74 72 6f 6c 20 48 | 61 6e 64 6c 2a 2f 0d 73 |ontrol H|andl*/.s|
|00000880| 74 61 74 69 63 20 43 6f | 6e 74 72 6f 6c 48 61 6e |tatic Co|ntrolHan|
|00000890| 64 6c 65 20 43 5f 48 6f | 72 69 7a 5f 53 63 72 6f |dle C_Ho|riz_Scro|
|000008a0| 6c 6c 5f 62 61 72 3b 09 | 2f 2a 20 53 63 72 6f 6c |ll_bar;.|/* Scrol|
|000008b0| 6c 20 62 61 72 20 20 43 | 6f 6e 74 72 6f 6c 20 48 |l bar C|ontrol H|
|000008c0| 61 6e 64 6c 2a 2f 0d 0d | 2f 2a 20 3d 3d 3d 3d 3d |andl*/..|/* =====|
|000008d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000008e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000008f0| 3d 20 2a 2f 0d 0d 2f 2a | 20 49 6e 69 74 69 61 6c |= */../*| Initial|
|00000900| 69 7a 65 20 75 73 20 73 | 6f 20 61 6c 6c 20 6f 75 |ize us s|o all ou|
|00000910| 72 20 72 6f 75 74 69 6e | 65 73 20 63 61 6e 20 62 |r routin|es can b|
|00000920| 65 20 61 63 74 69 76 61 | 74 65 64 20 2a 2f 0d 76 |e activa|ted */.v|
|00000930| 6f 69 64 20 49 6e 69 74 | 5f 52 65 73 75 6c 74 20 |oid Init|_Result |
|00000940| 28 29 0d 7b 0d 09 52 65 | 73 75 6c 74 5f 57 69 6e |().{..Re|sult_Win|
|00000950| 64 6f 77 20 3d 20 4e 49 | 4c 3b 09 09 09 2f 2a 20 |dow = NI|L;.../* |
|00000960| 4d 61 6b 65 20 73 75 72 | 65 20 6f 74 68 65 72 20 |Make sur|e other |
|00000970| 72 6f 75 74 69 6e 65 73 | 20 6b 6e 6f 77 20 77 65 |routines| know we|
|00000980| 20 61 72 65 20 6e 6f 74 | 20 2a 2f 0d 09 72 65 73 | are not| */..res|
|00000990| 75 6c 74 5f 72 65 63 74 | 2e 74 6f 70 20 3d 20 30 |ult_rect|.top = 0|
|000009a0| 3b 0d 09 72 65 73 75 6c | 74 5f 72 65 63 74 2e 62 |;..resul|t_rect.b|
|000009b0| 6f 74 74 6f 6d 20 3d 20 | 61 6c 6c 5f 6d 79 5f 63 |ottom = |all_my_c|
|000009c0| 6f 6c 6f 72 73 3b 0d 09 | 72 65 73 75 6c 74 5f 72 |olors;..|result_r|
|000009d0| 65 63 74 2e 6c 65 66 74 | 20 3d 20 30 3b 0d 09 72 |ect.left| = 0;..r|
|000009e0| 65 73 75 6c 74 5f 72 65 | 63 74 2e 72 69 67 68 74 |esult_re|ct.right|
|000009f0| 20 3d 20 33 30 30 3b 0d | 7d 0d 0d 2f 2a 20 3d 3d | = 300;.|}../* ==|
|00000a00| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000a10| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 20 |========|======= |
|00000a20| 2a 2f 0d 0d 76 6f 69 64 | 20 61 63 74 69 76 61 74 |*/..void| activat|
|00000a30| 65 5f 72 65 73 75 6c 74 | 20 28 77 68 69 63 68 57 |e_result| (whichW|
|00000a40| 69 6e 64 6f 77 2c 20 6d | 6f 64 69 66 69 65 72 73 |indow, m|odifiers|
|00000a50| 29 0d 09 57 69 6e 64 6f | 77 50 74 72 20 77 68 69 |)..Windo|wPtr whi|
|00000a60| 63 68 57 69 6e 64 6f 77 | 3b 0d 09 6c 6f 6e 67 20 |chWindow|;..long |
|00000a70| 6d 6f 64 69 66 69 65 72 | 73 3b 0d 7b 0d 09 57 69 |modifier|s;.{..Wi|
|00000a80| 6e 64 6f 77 50 74 72 20 | 53 61 76 65 50 6f 72 74 |ndowPtr |SavePort|
|00000a90| 3b 0d 0d 09 47 65 74 50 | 6f 72 74 20 28 26 53 61 |;...GetP|ort (&Sa|
|00000aa0| 76 65 50 6f 72 74 29 3b | 0d 09 69 66 20 28 20 6d |vePort);|..if ( m|
|00000ab0| 6f 64 69 66 69 65 72 73 | 20 26 20 61 63 74 69 76 |odifiers| & activ|
|00000ac0| 65 46 6c 61 67 20 21 3d | 20 30 20 29 0d 09 7b 0d |eFlag !=| 0 )..{.|
|00000ad0| 09 09 53 65 6c 65 63 74 | 57 69 6e 64 6f 77 28 77 |..Select|Window(w|
|00000ae0| 68 69 63 68 57 69 6e 64 | 6f 77 29 3b 0d 09 09 53 |hichWind|ow);...S|
|00000af0| 65 74 50 6f 72 74 28 77 | 68 69 63 68 57 69 6e 64 |etPort(w|hichWind|
|00000b00| 6f 77 29 3b 0d 09 09 53 | 68 6f 77 43 6f 6e 74 72 |ow);...S|howContr|
|00000b10| 6f 6c 20 28 53 63 72 6f | 6c 6c 48 48 61 6e 64 6c |ol (Scro|llHHandl|
|00000b20| 65 29 3b 0d 09 09 53 68 | 6f 77 43 6f 6e 74 72 6f |e);...Sh|owContro|
|00000b30| 6c 20 28 53 63 72 6f 6c | 6c 56 48 61 6e 64 6c 65 |l (Scrol|lVHandle|
|00000b40| 29 3b 0d 09 09 44 72 61 | 77 47 72 6f 77 49 63 6f |);...Dra|wGrowIco|
|00000b50| 6e 28 20 77 68 69 63 68 | 57 69 6e 64 6f 77 20 29 |n( which|Window )|
|00000b60| 3b 0d 09 09 44 72 61 77 | 43 6f 6e 74 72 6f 6c 73 |;...Draw|Controls|
|00000b70| 28 20 77 68 69 63 68 57 | 69 6e 64 6f 77 20 29 3b |( whichW|indow );|
|00000b80| 0d 09 7d 0d 09 65 6c 73 | 65 0d 09 7b 0d 09 09 53 |..}..els|e..{...S|
|00000b90| 65 74 50 6f 72 74 28 77 | 68 69 63 68 57 69 6e 64 |etPort(w|hichWind|
|00000ba0| 6f 77 29 3b 0d 09 09 48 | 69 64 65 43 6f 6e 74 72 |ow);...H|ideContr|
|00000bb0| 6f 6c 20 28 53 63 72 6f | 6c 6c 48 48 61 6e 64 6c |ol (Scro|llHHandl|
|00000bc0| 65 29 3b 0d 09 09 48 69 | 64 65 43 6f 6e 74 72 6f |e);...Hi|deContro|
|00000bd0| 6c 20 28 53 63 72 6f 6c | 6c 56 48 61 6e 64 6c 65 |l (Scrol|lVHandle|
|00000be0| 29 3b 0d 09 09 44 72 61 | 77 47 72 6f 77 49 63 6f |);...Dra|wGrowIco|
|00000bf0| 6e 28 20 77 68 69 63 68 | 57 69 6e 64 6f 77 20 29 |n( which|Window )|
|00000c00| 3b 0d 09 09 44 72 61 77 | 43 6f 6e 74 72 6f 6c 73 |;...Draw|Controls|
|00000c10| 28 20 77 68 69 63 68 57 | 69 6e 64 6f 77 20 29 3b |( whichW|indow );|
|00000c20| 0d 09 7d 0d 09 53 65 74 | 50 6f 72 74 28 53 61 76 |..}..Set|Port(Sav|
|00000c30| 65 50 6f 72 74 29 3b 0d | 7d 0d 0d 74 79 70 65 64 |ePort);.|}..typed|
|00000c40| 65 66 20 57 53 74 61 74 | 65 44 61 74 61 20 2a 2a |ef WStat|eData **|
|00000c50| 57 53 74 61 74 65 48 61 | 6e 64 6c 65 3b 0d 0d 76 |WStateHa|ndle;..v|
|00000c60| 6f 69 64 20 7a 6f 6f 6d | 5f 72 65 73 75 6c 74 28 |oid zoom|_result(|
|00000c70| 20 77 68 65 72 65 2c 20 | 77 68 69 63 68 57 69 6e | where, |whichWin|
|00000c80| 64 6f 77 2c 20 63 6f 64 | 65 20 29 0d 09 50 6f 69 |dow, cod|e )..Poi|
|00000c90| 6e 74 20 2a 20 77 68 65 | 72 65 3b 0d 09 57 69 6e |nt * whe|re;..Win|
|00000ca0| 64 6f 77 50 65 65 6b 20 | 77 68 69 63 68 57 69 6e |dowPeek |whichWin|
|00000cb0| 64 6f 77 3b 0d 09 73 68 | 6f 72 74 20 63 6f 64 65 |dow;..sh|ort code|
|00000cc0| 3b 0d 7b 0d 09 50 6f 69 | 6e 74 20 6d 79 50 74 3b |;.{..Poi|nt myPt;|
|00000cd0| 0d 09 57 53 74 61 74 65 | 48 61 6e 64 6c 65 20 57 |..WState|Handle W|
|00000ce0| 53 74 61 74 65 3b 0d 0d | 09 53 65 74 50 6f 72 74 |State;..|.SetPort|
|00000cf0| 20 28 77 68 69 63 68 57 | 69 6e 64 6f 77 29 3b 0d | (whichW|indow);.|
|00000d00| 0d 09 69 66 20 28 20 77 | 68 69 63 68 57 69 6e 64 |..if ( w|hichWind|
|00000d10| 6f 77 2d 3e 64 61 74 61 | 48 61 6e 64 6c 65 20 21 |ow->data|Handle !|
|00000d20| 3d 20 4e 49 4c 20 29 0d | 09 7b 0d 09 09 57 53 74 |= NIL ).|.{...WSt|
|00000d30| 61 74 65 20 3d 20 28 57 | 53 74 61 74 65 48 61 6e |ate = (W|StateHan|
|00000d40| 64 6c 65 29 20 77 68 69 | 63 68 57 69 6e 64 6f 77 |dle) whi|chWindow|
|00000d50| 2d 3e 64 61 74 61 48 61 | 6e 64 6c 65 3b 0d 09 09 |->dataHa|ndle;...|
|00000d60| 28 2a 2a 57 53 74 61 74 | 65 29 2e 73 74 64 53 74 |(**WStat|e).stdSt|
|00000d70| 61 74 65 20 3d 20 72 65 | 73 75 6c 74 5f 72 65 63 |ate = re|sult_rec|
|00000d80| 74 3b 0d 09 09 28 2a 2a | 57 53 74 61 74 65 29 2e |t;...(**|WState).|
|00000d90| 73 74 64 53 74 61 74 65 | 2e 74 6f 70 20 2b 3d 20 |stdState|.top += |
|00000da0| 34 30 3b 0d 09 09 28 2a | 2a 57 53 74 61 74 65 29 |40;...(*|*WState)|
|00000db0| 2e 73 74 64 53 74 61 74 | 65 2e 6c 65 66 74 20 2b |.stdStat|e.left +|
|00000dc0| 3d 20 32 3b 0d 09 09 28 | 2a 2a 57 53 74 61 74 65 |= 2;...(|**WState|
|00000dd0| 29 2e 73 74 64 53 74 61 | 74 65 2e 72 69 67 68 74 |).stdSta|te.right|
|00000de0| 20 2b 3d 20 32 3b 0d 09 | 09 28 2a 2a 57 53 74 61 | += 2;..|.(**WSta|
|00000df0| 74 65 29 2e 73 74 64 53 | 74 61 74 65 2e 62 6f 74 |te).stdS|tate.bot|
|00000e00| 74 6f 6d 20 2b 3d 20 34 | 30 3b 0d 09 09 69 66 20 |tom += 4|0;...if |
|00000e10| 28 20 20 28 2a 2a 57 53 | 74 61 74 65 29 2e 73 74 |( (**WS|tate).st|
|00000e20| 64 53 74 61 74 65 2e 62 | 6f 74 74 6f 6d 20 3e 20 |dState.b|ottom > |
|00000e30| 73 63 72 65 65 6e 42 69 | 74 73 2e 62 6f 75 6e 64 |screenBi|ts.bound|
|00000e40| 73 2e 62 6f 74 74 6f 6d | 20 29 0d 09 09 7b 0d 09 |s.bottom| )...{..|
|00000e50| 09 09 28 2a 2a 57 53 74 | 61 74 65 29 2e 73 74 64 |..(**WSt|ate).std|
|00000e60| 53 74 61 74 65 2e 62 6f | 74 74 6f 6d 20 3d 20 73 |State.bo|ttom = s|
|00000e70| 63 72 65 65 6e 42 69 74 | 73 2e 62 6f 75 6e 64 73 |creenBit|s.bounds|
|00000e80| 2e 62 6f 74 74 6f 6d 20 | 2d 20 35 3b 0d 09 09 7d |.bottom |- 5;...}|
|00000e90| 0d 09 09 69 66 20 28 20 | 20 28 2a 2a 57 53 74 61 |...if ( | (**WSta|
|00000ea0| 74 65 29 2e 73 74 64 53 | 74 61 74 65 2e 72 69 67 |te).stdS|tate.rig|
|00000eb0| 68 74 20 3e 20 73 63 72 | 65 65 6e 42 69 74 73 2e |ht > scr|eenBits.|
|00000ec0| 62 6f 75 6e 64 73 2e 72 | 69 67 68 74 20 29 0d 09 |bounds.r|ight )..|
|00000ed0| 09 7b 0d 09 09 09 28 2a | 2a 57 53 74 61 74 65 29 |.{....(*|*WState)|
|00000ee0| 2e 73 74 64 53 74 61 74 | 65 2e 72 69 67 68 74 20 |.stdStat|e.right |
|00000ef0| 3d 20 73 63 72 65 65 6e | 42 69 74 73 2e 62 6f 75 |= screen|Bits.bou|
|00000f00| 6e 64 73 2e 72 69 67 68 | 74 20 2d 20 35 3b 0d 09 |nds.righ|t - 5;..|
|00000f10| 09 7d 0d 0d 09 7d 0d 09 | 6d 79 50 74 20 3d 20 2a |.}...}..|myPt = *|
|00000f20| 77 68 65 72 65 3b 09 2f | 2a 20 47 65 74 20 6d 6f |where;./|* Get mo|
|00000f30| 75 73 65 20 70 6f 73 69 | 74 69 6f 6e 20 2a 2f 0d |use posi|tion */.|
|00000f40| 09 47 6c 6f 62 61 6c 54 | 6f 4c 6f 63 61 6c 20 28 |.GlobalT|oLocal (|
|00000f50| 26 6d 79 50 74 29 3b 09 | 2f 2a 20 4d 61 6b 65 20 |&myPt);.|/* Make |
|00000f60| 69 74 20 72 65 6c 61 74 | 69 76 65 20 2a 2f 0d 0d |it relat|ive */..|
|00000f70| 09 69 66 20 28 54 72 61 | 63 6b 42 6f 78 20 28 77 |.if (Tra|ckBox (w|
|00000f80| 68 69 63 68 57 69 6e 64 | 6f 77 2c 20 6d 79 50 74 |hichWind|ow, myPt|
|00000f90| 2c 20 63 6f 64 65 29 20 | 3d 3d 20 54 52 55 45 29 |, code) |== TRUE)|
|00000fa0| 0d 09 7b 0d 09 09 45 72 | 61 73 65 52 65 63 74 28 |..{...Er|aseRect(|
|00000fb0| 20 26 77 68 69 63 68 57 | 69 6e 64 6f 77 2d 3e 70 | &whichW|indow->p|
|00000fc0| 6f 72 74 2e 70 6f 72 74 | 52 65 63 74 20 29 3b 0d |ort.port|Rect );.|
|00000fd0| 09 09 5a 6f 6f 6d 57 69 | 6e 64 6f 77 20 28 77 68 |..ZoomWi|ndow (wh|
|00000fe0| 69 63 68 57 69 6e 64 6f | 77 2c 20 63 6f 64 65 2c |ichWindo|w, code,|
|00000ff0| 20 54 52 55 45 29 3b 0d | 09 09 49 6e 76 61 6c 52 | TRUE);.|..InvalR|
|00001000| 65 63 74 20 28 26 77 68 | 69 63 68 57 69 6e 64 6f |ect (&wh|ichWindo|
|00001010| 77 2d 3e 70 6f 72 74 2e | 70 6f 72 74 52 65 63 74 |w->port.|portRect|
|00001020| 29 3b 09 0d 09 7d 0d 09 | 52 65 73 69 7a 65 64 5f |);...}..|Resized_|
|00001030| 52 65 73 75 6c 74 28 20 | 52 65 73 75 6c 74 5f 57 |Result( |Result_W|
|00001040| 69 6e 64 6f 77 20 29 3b | 0d 7d 0d 0d 76 6f 69 64 |indow );|.}..void|
|00001050| 20 67 72 6f 77 5f 72 65 | 73 75 6c 74 28 20 77 68 | grow_re|sult( wh|
|00001060| 65 72 65 2c 20 77 68 69 | 63 68 57 69 6e 64 6f 77 |ere, whi|chWindow|
|00001070| 20 29 0d 09 50 6f 69 6e | 74 20 2a 20 77 68 65 72 | )..Poin|t * wher|
|00001080| 65 3b 0d 09 57 69 6e 64 | 6f 77 50 74 72 20 77 68 |e;..Wind|owPtr wh|
|00001090| 69 63 68 57 69 6e 64 6f | 77 3b 0d 7b 0d 09 50 6f |ichWindo|w;.{..Po|
|000010a0| 69 6e 74 20 6d 79 50 74 | 3b 0d 09 52 65 63 74 20 |int myPt|;..Rect |
|000010b0| 4f 6c 64 52 65 63 74 3b | 0d 09 6c 6f 6e 67 20 6d |OldRect;|..long m|
|000010c0| 52 65 73 75 6c 74 3b 0d | 0d 09 53 65 74 50 6f 72 |Result;.|..SetPor|
|000010d0| 74 20 28 77 68 69 63 68 | 57 69 6e 64 6f 77 29 3b |t (which|Window);|
|000010e0| 0d 0d 09 6d 79 50 74 20 | 3d 20 2a 77 68 65 72 65 |...myPt |= *where|
|000010f0| 3b 0d 09 47 6c 6f 62 61 | 6c 54 6f 4c 6f 63 61 6c |;..Globa|lToLocal|
|00001100| 20 28 26 6d 79 50 74 29 | 3b 09 2f 2a 20 4d 61 6b | (&myPt)|;./* Mak|
|00001110| 65 20 69 74 20 72 65 6c | 61 74 69 76 65 20 2a 2f |e it rel|ative */|
|00001120| 0d 0d 09 4f 6c 64 52 65 | 63 74 2e 6c 65 66 74 20 |...OldRe|ct.left |
|00001130| 3d 20 77 68 69 63 68 57 | 69 6e 64 6f 77 2d 3e 70 |= whichW|indow->p|
|00001140| 6f 72 74 52 65 63 74 2e | 6c 65 66 74 3b 0d 09 4f |ortRect.|left;..O|
|00001150| 6c 64 52 65 63 74 2e 72 | 69 67 68 74 20 3d 20 77 |ldRect.r|ight = w|
|00001160| 68 69 63 68 57 69 6e 64 | 6f 77 2d 3e 70 6f 72 74 |hichWind|ow->port|
|00001170| 52 65 63 74 2e 72 69 67 | 68 74 3b 0d 09 4f 6c 64 |Rect.rig|ht;..Old|
|00001180| 52 65 63 74 2e 74 6f 70 | 20 3d 20 77 68 69 63 68 |Rect.top| = which|
|00001190| 57 69 6e 64 6f 77 2d 3e | 70 6f 72 74 52 65 63 74 |Window->|portRect|
|000011a0| 2e 74 6f 70 3b 0d 09 4f | 6c 64 52 65 63 74 2e 62 |.top;..O|ldRect.b|
|000011b0| 6f 74 74 6f 6d 20 3d 20 | 77 68 69 63 68 57 69 6e |ottom = |whichWin|
|000011c0| 64 6f 77 2d 3e 70 6f 72 | 74 52 65 63 74 2e 62 6f |dow->por|tRect.bo|
|000011d0| 74 74 6f 6d 3b 0d 0d 09 | 6d 52 65 73 75 6c 74 20 |ttom;...|mResult |
|000011e0| 3d 20 47 72 6f 77 57 69 | 6e 64 6f 77 20 28 77 68 |= GrowWi|ndow (wh|
|000011f0| 69 63 68 57 69 6e 64 6f | 77 2c 20 2a 77 68 65 72 |ichWindo|w, *wher|
|00001200| 65 2c 20 26 72 65 73 75 | 6c 74 5f 72 65 63 74 29 |e, &resu|lt_rect)|
|00001210| 3b 0d 0d 09 53 69 7a 65 | 57 69 6e 64 6f 77 20 28 |;...Size|Window (|
|00001220| 77 68 69 63 68 57 69 6e | 64 6f 77 2c 20 4c 6f 57 |whichWin|dow, LoW|
|00001230| 6f 72 64 20 28 6d 52 65 | 73 75 6c 74 29 2c 0d 09 |ord (mRe|sult),..|
|00001240| 09 09 09 48 69 57 6f 72 | 64 20 28 6d 52 65 73 75 |...HiWor|d (mResu|
|00001250| 6c 74 29 2c 20 54 52 55 | 45 29 3b 0d 09 52 65 73 |lt), TRU|E);..Res|
|00001260| 69 7a 65 64 5f 52 65 73 | 75 6c 74 28 52 65 73 75 |ized_Res|ult(Resu|
|00001270| 6c 74 5f 57 69 6e 64 6f | 77 29 3b 0d 7d 0d 0d 2f |lt_Windo|w);.}../|
|00001280| 2a 20 57 65 20 77 65 72 | 65 20 72 65 73 69 7a 65 |* We wer|e resize|
|00001290| 64 20 6f 72 20 7a 6f 6f | 6d 65 64 2c 20 75 70 64 |d or zoo|med, upd|
|000012a0| 61 74 65 20 74 68 65 20 | 73 63 72 6f 6c 6c 69 6e |ate the |scrollin|
|000012b0| 67 20 73 63 72 6f 6c 6c | 62 61 72 73 20 2a 2f 0d |g scroll|bars */.|
|000012c0| 76 6f 69 64 20 52 65 73 | 69 7a 65 64 5f 52 65 73 |void Res|ized_Res|
|000012d0| 75 6c 74 20 28 20 77 68 | 69 63 68 57 69 6e 64 6f |ult ( wh|ichWindo|
|000012e0| 77 29 09 2f 2a 20 52 65 | 73 69 7a 65 64 20 74 68 |w)./* Re|sized th|
|000012f0| 69 73 20 77 69 6e 64 6f | 77 20 2a 2f 0d 09 57 69 |is windo|w */..Wi|
|00001300| 6e 64 6f 77 50 74 72 20 | 77 68 69 63 68 57 69 6e |ndowPtr |whichWin|
|00001310| 64 6f 77 3b 09 09 2f 2a | 20 57 69 6e 64 6f 77 20 |dow;../*| Window |
|00001320| 74 68 61 74 20 77 61 73 | 20 72 65 73 69 7a 65 64 |that was| resized|
|00001330| 20 2a 2f 0d 7b 0d 09 57 | 69 6e 64 6f 77 50 74 72 | */.{..W|indowPtr|
|00001340| 20 53 61 76 65 50 6f 72 | 74 3b 09 09 2f 2a 20 50 | SavePor|t;../* P|
|00001350| 6c 61 63 65 20 74 6f 20 | 73 61 76 65 20 74 68 65 |lace to |save the|
|00001360| 20 6c 61 73 74 20 70 6f | 72 74 20 2a 2f 0d 09 52 | last po|rt */..R|
|00001370| 65 63 74 20 74 65 6d 70 | 32 52 65 63 74 3b 09 09 |ect temp|2Rect;..|
|00001380| 09 2f 2a 20 74 65 6d 70 | 20 72 65 63 74 61 6e 67 |./* temp| rectang|
|00001390| 6c 65 20 2a 2f 0d 0d 09 | 47 65 74 50 6f 72 74 20 |le */...|GetPort |
|000013a0| 28 26 53 61 76 65 50 6f | 72 74 29 3b 0d 09 53 65 |(&SavePo|rt);..Se|
|000013b0| 74 50 6f 72 74 20 28 52 | 65 73 75 6c 74 5f 57 69 |tPort (R|esult_Wi|
|000013c0| 6e 64 6f 77 29 3b 0d 0d | 09 69 66 20 28 53 63 72 |ndow);..|.if (Scr|
|000013d0| 6f 6c 6c 48 48 61 6e 64 | 6c 65 20 21 3d 20 4e 49 |ollHHand|le != NI|
|000013e0| 4c 29 0d 09 7b 0d 09 09 | 48 4c 6f 63 6b 20 28 28 |L)..{...|HLock ((|
|000013f0| 48 61 6e 64 6c 65 29 53 | 63 72 6f 6c 6c 48 48 61 |Handle)S|crollHHa|
|00001400| 6e 64 6c 65 29 3b 0d 09 | 09 48 69 64 65 43 6f 6e |ndle);..|.HideCon|
|00001410| 74 72 6f 6c 20 28 53 63 | 72 6f 6c 6c 48 48 61 6e |trol (Sc|rollHHan|
|00001420| 64 6c 65 29 3b 0d 0d 09 | 09 49 6e 76 61 6c 52 65 |dle);...|.InvalRe|
|00001430| 63 74 20 28 26 28 2a 53 | 63 72 6f 6c 6c 48 48 61 |ct (&(*S|crollHHa|
|00001440| 6e 64 6c 65 29 2d 3e 63 | 6f 6e 74 72 6c 52 65 63 |ndle)->c|ontrlRec|
|00001450| 74 29 3b 09 2f 2a 20 46 | 6c 61 67 20 6f 6c 64 20 |t);./* F|lag old |
|00001460| 70 6f 73 69 74 69 6f 6e | 20 66 6f 72 20 75 70 64 |position| for upd|
|00001470| 61 74 65 20 72 6f 75 74 | 2a 2f 0d 0d 09 09 4d 6f |ate rout|*/....Mo|
|00001480| 76 65 43 6f 6e 74 72 6f | 6c 20 28 53 63 72 6f 6c |veContro|l (Scrol|
|00001490| 6c 48 48 61 6e 64 6c 65 | 2c 20 52 65 73 75 6c 74 |lHHandle|, Result|
|000014a0| 5f 57 69 6e 64 6f 77 2d | 3e 70 6f 72 74 52 65 63 |_Window-|>portRec|
|000014b0| 74 2e 6c 65 66 74 2d 31 | 2c 0d 09 09 09 52 65 73 |t.left-1|,....Res|
|000014c0| 75 6c 74 5f 57 69 6e 64 | 6f 77 2d 3e 70 6f 72 74 |ult_Wind|ow->port|
|000014d0| 52 65 63 74 2e 62 6f 74 | 74 6f 6d 20 2d 20 31 35 |Rect.bot|tom - 15|
|000014e0| 29 3b 0d 09 09 53 69 7a | 65 43 6f 6e 74 72 6f 6c |);...Siz|eControl|
|000014f0| 20 28 53 63 72 6f 6c 6c | 48 48 61 6e 64 6c 65 2c | (Scroll|HHandle,|
|00001500| 20 28 52 65 73 75 6c 74 | 5f 57 69 6e 64 6f 77 2d | (Result|_Window-|
|00001510| 3e 70 6f 72 74 52 65 63 | 74 2e 72 69 67 68 74 20 |>portRec|t.right |
|00001520| 0d 09 09 09 2d 20 52 65 | 73 75 6c 74 5f 57 69 6e |....- Re|sult_Win|
|00001530| 64 6f 77 2d 3e 70 6f 72 | 74 52 65 63 74 2e 6c 65 |dow->por|tRect.le|
|00001540| 66 74 29 20 2d 20 31 33 | 2c 20 31 36 29 3b 0d 0d |ft) - 13|, 16);..|
|00001550| 09 09 53 68 6f 77 43 6f | 6e 74 72 6f 6c 20 28 53 |..ShowCo|ntrol (S|
|00001560| 63 72 6f 6c 6c 48 48 61 | 6e 64 6c 65 29 3b 0d 09 |crollHHa|ndle);..|
|00001570| 09 48 55 6e 6c 6f 63 6b | 20 28 28 48 61 6e 64 6c |.HUnlock| ((Handl|
|00001580| 65 29 53 63 72 6f 6c 6c | 48 48 61 6e 64 6c 65 29 |e)Scroll|HHandle)|
|00001590| 3b 0d 09 7d 0d 09 69 66 | 20 28 53 63 72 6f 6c 6c |;..}..if| (Scroll|
|000015a0| 56 48 61 6e 64 6c 65 20 | 21 3d 20 4e 49 4c 29 0d |VHandle |!= NIL).|
|000015b0| 09 7b 0d 09 09 48 4c 6f | 63 6b 20 28 28 48 61 6e |.{...HLo|ck ((Han|
|000015c0| 64 6c 65 29 53 63 72 6f | 6c 6c 56 48 61 6e 64 6c |dle)Scro|llVHandl|
|000015d0| 65 29 3b 0d 09 09 48 69 | 64 65 43 6f 6e 74 72 6f |e);...Hi|deContro|
|000015e0| 6c 20 28 53 63 72 6f 6c | 6c 56 48 61 6e 64 6c 65 |l (Scrol|lVHandle|
|000015f0| 29 3b 0d 0d 09 09 49 6e | 76 61 6c 52 65 63 74 20 |);....In|valRect |
|00001600| 28 26 28 2a 53 63 72 6f | 6c 6c 56 48 61 6e 64 6c |(&(*Scro|llVHandl|
|00001610| 65 29 2d 3e 63 6f 6e 74 | 72 6c 52 65 63 74 29 3b |e)->cont|rlRect);|
|00001620| 09 2f 2a 20 46 6c 61 67 | 20 6f 6c 64 20 70 6f 73 |./* Flag| old pos|
|00001630| 69 74 69 6f 6e 20 66 6f | 72 20 75 70 64 61 74 65 |ition fo|r update|
|00001640| 20 72 6f 75 74 2a 2f 0d | 0d 09 09 4d 6f 76 65 43 | rout*/.|...MoveC|
|00001650| 6f 6e 74 72 6f 6c 20 28 | 53 63 72 6f 6c 6c 56 48 |ontrol (|ScrollVH|
|00001660| 61 6e 64 6c 65 2c 20 52 | 65 73 75 6c 74 5f 57 69 |andle, R|esult_Wi|
|00001670| 6e 64 6f 77 2d 3e 70 6f | 72 74 52 65 63 74 2e 72 |ndow->po|rtRect.r|
|00001680| 69 67 68 74 2d 31 35 2c | 0d 09 09 09 52 65 73 75 |ight-15,|....Resu|
|00001690| 6c 74 5f 57 69 6e 64 6f | 77 2d 3e 70 6f 72 74 52 |lt_Windo|w->portR|
|000016a0| 65 63 74 2e 74 6f 70 2d | 31 29 3b 0d 09 09 53 69 |ect.top-|1);...Si|
|000016b0| 7a 65 43 6f 6e 74 72 6f | 6c 20 28 53 63 72 6f 6c |zeContro|l (Scrol|
|000016c0| 6c 56 48 61 6e 64 6c 65 | 2c 20 31 36 2c 20 28 52 |lVHandle|, 16, (R|
|000016d0| 65 73 75 6c 74 5f 57 69 | 6e 64 6f 77 2d 3e 70 6f |esult_Wi|ndow->po|
|000016e0| 72 74 52 65 63 74 2e 62 | 6f 74 74 6f 6d 20 0d 09 |rtRect.b|ottom ..|
|000016f0| 09 09 2d 20 52 65 73 75 | 6c 74 5f 57 69 6e 64 6f |..- Resu|lt_Windo|
|00001700| 77 2d 3e 70 6f 72 74 52 | 65 63 74 2e 74 6f 70 29 |w->portR|ect.top)|
|00001710| 20 2d 20 31 33 29 3b 0d | 0d 09 09 53 68 6f 77 43 | - 13);.|...ShowC|
|00001720| 6f 6e 74 72 6f 6c 20 28 | 53 63 72 6f 6c 6c 56 48 |ontrol (|ScrollVH|
|00001730| 61 6e 64 6c 65 29 3b 0d | 09 09 48 55 6e 6c 6f 63 |andle);.|..HUnloc|
|00001740| 6b 20 28 28 48 61 6e 64 | 6c 65 29 53 63 72 6f 6c |k ((Hand|le)Scrol|
|00001750| 6c 56 48 61 6e 64 6c 65 | 29 3b 0d 09 7d 0d 09 49 |lVHandle|);..}..I|
|00001760| 6e 76 61 6c 52 65 63 74 | 28 26 52 65 73 75 6c 74 |nvalRect|(&Result|
|00001770| 5f 57 69 6e 64 6f 77 2d | 3e 70 6f 72 74 52 65 63 |_Window-|>portRec|
|00001780| 74 29 3b 0d 09 44 72 61 | 77 47 72 6f 77 49 63 6f |t);..Dra|wGrowIco|
|00001790| 6e 20 28 52 65 73 75 6c | 74 5f 57 69 6e 64 6f 77 |n (Resul|t_Window|
|000017a0| 29 3b 09 0d 09 53 65 74 | 50 6f 72 74 20 28 53 61 |);...Set|Port (Sa|
|000017b0| 76 65 50 6f 72 74 29 3b | 0d 7d 0d 2f 2a 20 45 6e |vePort);|.}./* En|
|000017c0| 64 20 6f 66 20 66 75 6e | 63 74 69 6f 6e 20 2a 2f |d of fun|ction */|
|000017d0| 0d 0d 2f 2a 20 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |../* ===|========|
|000017e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000017f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 20 2a 2f 0d 0d |========|=== */..|
|00001800| 2f 2a 20 55 70 64 61 74 | 65 20 6f 75 72 20 77 69 |/* Updat|e our wi|
|00001810| 6e 64 6f 77 2c 20 73 6f | 6d 65 6f 6e 65 20 75 6e |ndow, so|meone un|
|00001820| 63 6f 76 65 72 65 64 20 | 61 20 70 61 72 74 20 6f |covered |a part o|
|00001830| 66 20 75 73 20 2a 2f 0d | 76 6f 69 64 20 55 70 44 |f us */.|void UpD|
|00001840| 61 74 65 5f 52 65 73 75 | 6c 74 20 28 77 68 69 63 |ate_Resu|lt (whic|
|00001850| 68 57 69 6e 64 6f 77 29 | 0d 57 69 6e 64 6f 77 50 |hWindow)|.WindowP|
|00001860| 74 72 20 77 68 69 63 68 | 57 69 6e 64 6f 77 3b 0d |tr which|Window;.|
|00001870| 7b 0d 09 57 69 6e 64 6f | 77 50 74 72 20 53 61 76 |{..Windo|wPtr Sav|
|00001880| 65 50 6f 72 74 3b 09 09 | 2f 2a 20 50 6c 61 63 65 |ePort;..|/* Place|
|00001890| 20 74 6f 20 73 61 76 65 | 20 74 68 65 20 6c 61 73 | to save| the las|
|000018a0| 74 20 70 6f 72 74 20 2a | 2f 0d 0d 09 47 65 74 50 |t port *|/...GetP|
|000018b0| 6f 72 74 20 28 26 53 61 | 76 65 50 6f 72 74 29 3b |ort (&Sa|vePort);|
|000018c0| 09 2f 2a 20 53 61 76 65 | 20 74 68 65 20 63 75 72 |./* Save| the cur|
|000018d0| 72 65 6e 74 20 70 6f 72 | 74 20 2a 2f 0d 09 53 65 |rent por|t */..Se|
|000018e0| 74 50 6f 72 74 20 28 52 | 65 73 75 6c 74 5f 57 69 |tPort (R|esult_Wi|
|000018f0| 6e 64 6f 77 29 3b 09 2f | 2a 20 53 65 74 20 74 68 |ndow);./|* Set th|
|00001900| 65 20 70 6f 72 74 20 74 | 6f 20 6d 79 20 77 69 6e |e port t|o my win|
|00001910| 64 6f 77 20 2a 2f 0d 0d | 09 49 6e 76 61 6c 52 65 |dow */..|.InvalRe|
|00001920| 63 74 28 26 52 65 73 75 | 6c 74 5f 57 69 6e 64 6f |ct(&Resu|lt_Windo|
|00001930| 77 2d 3e 70 6f 72 74 52 | 65 63 74 29 3b 0d 0d 09 |w->portR|ect);...|
|00001940| 42 65 67 69 6e 55 70 64 | 61 74 65 20 28 52 65 73 |BeginUpd|ate (Res|
|00001950| 75 6c 74 5f 57 69 6e 64 | 6f 77 29 3b 0d 09 64 72 |ult_Wind|ow);..dr|
|00001960| 61 77 5f 72 65 73 75 6c | 74 28 29 3b 0d 09 44 72 |aw_resul|t();..Dr|
|00001970| 61 77 43 6f 6e 74 72 6f | 6c 73 20 28 52 65 73 75 |awContro|ls (Resu|
|00001980| 6c 74 5f 57 69 6e 64 6f | 77 29 3b 09 2f 2a 20 44 |lt_Windo|w);./* D|
|00001990| 72 61 77 20 61 6c 6c 20 | 74 68 65 20 63 6f 6e 74 |raw all |the cont|
|000019a0| 72 6f 6c 73 20 2a 2f 0d | 09 44 72 61 77 47 72 6f |rols */.|.DrawGro|
|000019b0| 77 49 63 6f 6e 20 28 52 | 65 73 75 6c 74 5f 57 69 |wIcon (R|esult_Wi|
|000019c0| 6e 64 6f 77 29 3b 09 2f | 2a 20 44 72 61 77 20 74 |ndow);./|* Draw t|
|000019d0| 68 65 20 47 72 6f 77 20 | 62 6f 78 20 2a 2f 0d 09 |he Grow |box */..|
|000019e0| 45 6e 64 55 70 64 61 74 | 65 20 28 20 52 65 73 75 |EndUpdat|e ( Resu|
|000019f0| 6c 74 5f 57 69 6e 64 6f | 77 20 29 3b 0d 09 53 65 |lt_Windo|w );..Se|
|00001a00| 74 50 6f 72 74 20 28 53 | 61 76 65 50 6f 72 74 29 |tPort (S|avePort)|
|00001a10| 3b 09 2f 2a 20 52 65 73 | 74 6f 72 65 20 74 68 65 |;./* Res|tore the|
|00001a20| 20 6f 6c 64 20 70 6f 72 | 74 20 2a 2f 0d 7d 0d 0d | old por|t */.}..|
|00001a30| 65 78 74 65 72 6e 20 43 | 47 72 61 66 50 74 72 20 |extern C|GrafPtr |
|00001a40| 70 72 6f 74 6f 6e 5f 62 | 6d 61 70 3b 0d 65 78 74 |proton_b|map;.ext|
|00001a50| 65 72 6e 20 52 65 63 74 | 20 70 72 6f 74 6f 6e 5f |ern Rect| proton_|
|00001a60| 72 65 63 74 3b 0d 65 78 | 74 65 72 6e 20 73 68 6f |rect;.ex|tern sho|
|00001a70| 72 74 20 73 31 5f 6f 66 | 66 5f 74 6f 70 2c 20 73 |rt s1_of|f_top, s|
|00001a80| 31 5f 6f 66 66 5f 6c 65 | 66 74 3b 0d 65 78 74 65 |1_off_le|ft;.exte|
|00001a90| 72 6e 20 43 47 72 61 66 | 50 74 72 20 66 6c 6f 75 |rn CGraf|Ptr flou|
|00001aa0| 72 69 6e 65 5f 62 6d 61 | 70 3b 0d 65 78 74 65 72 |rine_bma|p;.exter|
|00001ab0| 6e 20 52 65 63 74 20 66 | 6c 6f 75 72 69 6e 65 5f |n Rect f|lourine_|
|00001ac0| 72 65 63 74 3b 0d 65 78 | 74 65 72 6e 20 73 68 6f |rect;.ex|tern sho|
|00001ad0| 72 74 20 73 32 5f 6f 66 | 66 5f 74 6f 70 2c 20 73 |rt s2_of|f_top, s|
|00001ae0| 32 5f 6f 66 66 5f 6c 65 | 66 74 3b 0d 0d 73 68 6f |2_off_le|ft;..sho|
|00001af0| 72 74 20 73 72 63 5f 63 | 68 61 6e 67 65 64 3b 20 |rt src_c|hanged; |
|00001b00| 2f 2a 20 67 6c 6f 62 61 | 6c 3a 20 31 20 69 66 20 |/* globa|l: 1 if |
|00001b10| 65 69 74 68 65 72 20 73 | 6f 75 72 63 65 20 69 6d |either s|ource im|
|00001b20| 61 67 65 20 68 61 73 20 | 6d 6f 76 65 64 20 6f 72 |age has |moved or|
|00001b30| 20 63 68 61 6e 67 65 64 | 2c 20 30 20 6f 74 68 65 | changed|, 0 othe|
|00001b40| 72 77 69 73 65 20 2a 2f | 0d 0d 73 74 61 74 69 63 |rwise */|..static|
|00001b50| 20 76 6f 69 64 20 64 72 | 61 77 5f 72 65 73 75 6c | void dr|aw_resul|
|00001b60| 74 28 29 0d 7b 0d 09 52 | 65 63 74 20 63 6c 69 70 |t().{..R|ect clip|
|00001b70| 70 65 72 3b 0d 09 73 68 | 6f 72 74 20 69 3b 0d 09 |per;..sh|ort i;..|
|00001b80| 52 65 63 74 20 6f 66 66 | 72 65 63 74 3b 0d 09 47 |Rect off|rect;..G|
|00001b90| 44 48 61 6e 64 6c 65 20 | 74 68 65 6d 61 78 64 65 |DHandle |themaxde|
|00001ba0| 76 69 63 65 3b 0d 09 50 | 6f 69 6e 74 20 74 65 6d |vice;..P|oint tem|
|00001bb0| 70 50 3b 0d 09 52 65 63 | 74 20 67 6c 6f 62 52 65 |pP;..Rec|t globRe|
|00001bc0| 63 74 3b 0d 09 0d 09 63 | 6c 69 70 70 65 72 2e 74 |ct;....c|lipper.t|
|00001bd0| 6f 70 20 3d 20 52 65 73 | 75 6c 74 5f 57 69 6e 64 |op = Res|ult_Wind|
|00001be0| 6f 77 2d 3e 70 6f 72 74 | 52 65 63 74 2e 74 6f 70 |ow->port|Rect.top|
|00001bf0| 3b 0d 09 63 6c 69 70 70 | 65 72 2e 62 6f 74 74 6f |;..clipp|er.botto|
|00001c00| 6d 20 3d 20 52 65 73 75 | 6c 74 5f 57 69 6e 64 6f |m = Resu|lt_Windo|
|00001c10| 77 2d 3e 70 6f 72 74 52 | 65 63 74 2e 62 6f 74 74 |w->portR|ect.bott|
|00001c20| 6f 6d 20 2d 20 31 35 3b | 0d 09 63 6c 69 70 70 65 |om - 15;|..clippe|
|00001c30| 72 2e 72 69 67 68 74 20 | 3d 20 52 65 73 75 6c 74 |r.right |= Result|
|00001c40| 5f 57 69 6e 64 6f 77 2d | 3e 70 6f 72 74 52 65 63 |_Window-|>portRec|
|00001c50| 74 2e 72 69 67 68 74 20 | 2d 20 31 35 3b 0d 09 63 |t.right |- 15;..c|
|00001c60| 6c 69 70 70 65 72 2e 6c | 65 66 74 20 3d 20 52 65 |lipper.l|eft = Re|
|00001c70| 73 75 6c 74 5f 57 69 6e | 64 6f 77 2d 3e 70 6f 72 |sult_Win|dow->por|
|00001c80| 74 52 65 63 74 2e 6c 65 | 66 74 3b 0d 0d 09 43 6c |tRect.le|ft;...Cl|
|00001c90| 69 70 52 65 63 74 28 20 | 26 63 6c 69 70 70 65 72 |ipRect( |&clipper|
|00001ca0| 20 29 3b 0d 0d 09 45 72 | 61 73 65 52 65 63 74 28 | );...Er|aseRect(|
|00001cb0| 20 26 63 6c 69 70 70 65 | 72 20 29 3b 0d 09 69 66 | &clippe|r );..if|
|00001cc0| 20 28 20 70 72 6f 74 6f | 6e 5f 62 6d 61 70 20 21 | ( proto|n_bmap !|
|00001cd0| 3d 20 4e 49 4c 20 26 26 | 20 66 6c 6f 75 72 69 6e |= NIL &&| flourin|
|00001ce0| 65 5f 62 6d 61 70 20 21 | 3d 20 4e 49 4c 20 29 0d |e_bmap !|= NIL ).|
|00001cf0| 09 7b 0d 09 09 69 66 20 | 28 20 73 72 63 5f 63 68 |.{...if |( src_ch|
|00001d00| 61 6e 67 65 64 20 29 0d | 09 09 7b 0d 09 09 09 74 |anged ).|..{....t|
|00001d10| 65 6d 70 50 2e 76 20 3d | 20 52 65 73 75 6c 74 5f |empP.v =| Result_|
|00001d20| 57 69 6e 64 6f 77 2d 3e | 70 6f 72 74 52 65 63 74 |Window->|portRect|
|00001d30| 2e 74 6f 70 3b 0d 09 09 | 09 74 65 6d 70 50 2e 68 |.top;...|.tempP.h|
|00001d40| 20 3d 20 52 65 73 75 6c | 74 5f 57 69 6e 64 6f 77 | = Resul|t_Window|
|00001d50| 2d 3e 70 6f 72 74 52 65 | 63 74 2e 6c 65 66 74 3b |->portRe|ct.left;|
|00001d60| 0d 09 09 09 4c 6f 63 61 | 6c 54 6f 47 6c 6f 62 61 |....Loca|lToGloba|
|00001d70| 6c 28 26 74 65 6d 70 50 | 29 3b 0d 09 09 09 67 6c |l(&tempP|);....gl|
|00001d80| 6f 62 52 65 63 74 2e 74 | 6f 70 20 3d 20 74 65 6d |obRect.t|op = tem|
|00001d90| 70 50 2e 76 3b 0d 09 09 | 09 67 6c 6f 62 52 65 63 |pP.v;...|.globRec|
|00001da0| 74 2e 6c 65 66 74 20 3d | 20 74 65 6d 70 50 2e 68 |t.left =| tempP.h|
|00001db0| 3b 0d 0d 09 09 09 74 65 | 6d 70 50 2e 76 20 3d 20 |;.....te|mpP.v = |
|00001dc0| 52 65 73 75 6c 74 5f 57 | 69 6e 64 6f 77 2d 3e 70 |Result_W|indow->p|
|00001dd0| 6f 72 74 52 65 63 74 2e | 62 6f 74 74 6f 6d 3b 0d |ortRect.|bottom;.|
|00001de0| 09 09 09 74 65 6d 70 50 | 2e 68 20 3d 20 52 65 73 |...tempP|.h = Res|
|00001df0| 75 6c 74 5f 57 69 6e 64 | 6f 77 2d 3e 70 6f 72 74 |ult_Wind|ow->port|
|00001e00| 52 65 63 74 2e 72 69 67 | 68 74 3b 0d 09 09 09 4c |Rect.rig|ht;....L|
|00001e10| 6f 63 61 6c 54 6f 47 6c | 6f 62 61 6c 28 26 74 65 |ocalToGl|obal(&te|
|00001e20| 6d 70 50 29 3b 20 0d 09 | 09 09 67 6c 6f 62 52 65 |mpP); ..|..globRe|
|00001e30| 63 74 2e 62 6f 74 74 6f | 6d 20 3d 20 74 65 6d 70 |ct.botto|m = temp|
|00001e40| 50 2e 76 3b 0d 09 09 09 | 67 6c 6f 62 52 65 63 74 |P.v;....|globRect|
|00001e50| 2e 72 69 67 68 74 20 3d | 20 74 65 6d 70 50 2e 68 |.right =| tempP.h|
|00001e60| 3b 0d 0d 09 09 09 74 68 | 65 6d 61 78 64 65 76 69 |;.....th|emaxdevi|
|00001e70| 63 65 20 3d 20 47 65 74 | 4d 61 78 44 65 76 69 63 |ce = Get|MaxDevic|
|00001e80| 65 28 26 67 6c 6f 62 52 | 65 63 74 29 3b 20 0d 09 |e(&globR|ect); ..|
|00001e90| 09 09 0d 09 09 09 61 64 | 64 5f 62 6d 61 70 73 28 |......ad|d_bmaps(|
|00001ea0| 20 70 72 6f 74 6f 6e 5f | 62 6d 61 70 2c 20 26 70 | proton_|bmap, &p|
|00001eb0| 72 6f 74 6f 6e 5f 72 65 | 63 74 2c 20 73 31 5f 6f |roton_re|ct, s1_o|
|00001ec0| 66 66 5f 74 6f 70 2c 20 | 73 31 5f 6f 66 66 5f 6c |ff_top, |s1_off_l|
|00001ed0| 65 66 74 2c 0d 09 09 09 | 09 09 66 6c 6f 75 72 69 |eft,....|..flouri|
|00001ee0| 6e 65 5f 62 6d 61 70 2c | 20 26 66 6c 6f 75 72 69 |ne_bmap,| &flouri|
|00001ef0| 6e 65 5f 72 65 63 74 2c | 20 73 32 5f 6f 66 66 5f |ne_rect,| s2_off_|
|00001f00| 74 6f 70 2c 20 73 32 5f | 6f 66 66 5f 6c 65 66 74 |top, s2_|off_left|
|00001f10| 2c 0d 09 09 09 09 09 26 | 72 65 73 75 6c 74 5f 62 |,......&|result_b|
|00001f20| 6d 61 70 2c 20 26 72 65 | 73 75 6c 74 5f 72 65 63 |map, &re|sult_rec|
|00001f30| 74 2c 20 74 68 65 6d 61 | 78 64 65 76 69 63 65 20 |t, thema|xdevice |
|00001f40| 29 3b 20 20 2f 2a 20 64 | 65 6c 65 74 65 73 20 6f |); /* d|eletes o|
|00001f50| 6c 64 20 72 65 73 75 6c | 74 5f 62 6d 61 70 2c 20 |ld resul|t_bmap, |
|00001f60| 72 65 74 75 72 6e 73 20 | 6e 65 77 20 6f 6e 65 20 |returns |new one |
|00001f70| 2a 2f 0d 09 09 09 73 72 | 63 5f 63 68 61 6e 67 65 |*/....sr|c_change|
|00001f80| 64 20 3d 20 46 41 4c 53 | 45 3b 0d 09 09 09 6f 66 |d = FALS|E;....of|
|00001f90| 66 5f 74 6f 70 20 3d 20 | 30 3b 0d 09 09 09 6f 66 |f_top = |0;....of|
|00001fa0| 66 5f 6c 65 66 74 20 3d | 20 30 3b 0d 09 09 09 53 |f_left =| 0;....S|
|00001fb0| 65 74 43 74 6c 56 61 6c | 75 65 20 28 53 63 72 6f |etCtlVal|ue (Scro|
|00001fc0| 6c 6c 48 48 61 6e 64 6c | 65 2c 20 6d 69 6e 5f 73 |llHHandl|e, min_s|
|00001fd0| 63 72 6f 6c 6c 29 3b 0d | 09 09 09 53 65 74 43 74 |croll);.|...SetCt|
|00001fe0| 6c 56 61 6c 75 65 20 28 | 53 63 72 6f 6c 6c 56 48 |lValue (|ScrollVH|
|00001ff0| 61 6e 64 6c 65 2c 20 6d | 69 6e 5f 73 63 72 6f 6c |andle, m|in_scrol|
|00002000| 6c 29 3b 09 0d 09 09 7d | 0d 0d 09 09 69 66 20 28 |l);....}|....if (|
|00002010| 20 72 65 73 75 6c 74 5f | 62 6d 61 70 20 21 3d 20 | result_|bmap != |
|00002020| 4e 49 4c 20 29 0d 09 09 | 7b 0d 09 09 09 6f 66 66 |NIL )...|{....off|
|00002030| 72 65 63 74 20 3d 20 63 | 6c 69 70 70 65 72 3b 0d |rect = c|lipper;.|
|00002040| 09 09 09 6f 66 66 72 65 | 63 74 2e 74 6f 70 20 2b |...offre|ct.top +|
|00002050| 3d 20 6f 66 66 5f 74 6f | 70 3b 0d 09 09 09 6f 66 |= off_to|p;....of|
|00002060| 66 72 65 63 74 2e 62 6f | 74 74 6f 6d 20 2b 3d 20 |frect.bo|ttom += |
|00002070| 6f 66 66 5f 74 6f 70 3b | 0d 09 09 09 69 66 20 28 |off_top;|....if (|
|00002080| 20 6f 66 66 72 65 63 74 | 2e 62 6f 74 74 6f 6d 20 | offrect|.bottom |
|00002090| 3e 20 72 65 73 75 6c 74 | 5f 72 65 63 74 2e 62 6f |> result|_rect.bo|
|000020a0| 74 74 6f 6d 20 2b 20 6f | 66 66 5f 74 6f 70 20 29 |ttom + o|ff_top )|
|000020b0| 0d 09 09 09 7b 0d 09 09 | 09 09 6f 66 66 72 65 63 |....{...|..offrec|
|000020c0| 74 2e 62 6f 74 74 6f 6d | 20 3d 20 72 65 73 75 6c |t.bottom| = resul|
|000020d0| 74 5f 72 65 63 74 2e 62 | 6f 74 74 6f 6d 3b 0d 09 |t_rect.b|ottom;..|
|000020e0| 09 09 09 63 6c 69 70 70 | 65 72 2e 62 6f 74 74 6f |...clipp|er.botto|
|000020f0| 6d 20 3d 20 72 65 73 75 | 6c 74 5f 72 65 63 74 2e |m = resu|lt_rect.|
|00002100| 62 6f 74 74 6f 6d 20 2d | 20 6f 66 66 5f 74 6f 70 |bottom -| off_top|
|00002110| 3b 0d 09 09 09 7d 0d 09 | 09 09 6f 66 66 72 65 63 |;....}..|..offrec|
|00002120| 74 2e 6c 65 66 74 20 2b | 3d 20 6f 66 66 5f 6c 65 |t.left +|= off_le|
|00002130| 66 74 3b 0d 09 09 09 6f | 66 66 72 65 63 74 2e 72 |ft;....o|ffrect.r|
|00002140| 69 67 68 74 20 2b 3d 20 | 6f 66 66 5f 6c 65 66 74 |ight += |off_left|
|00002150| 3b 0d 09 09 09 69 66 20 | 28 20 6f 66 66 72 65 63 |;....if |( offrec|
|00002160| 74 2e 72 69 67 68 74 20 | 3e 20 72 65 73 75 6c 74 |t.right |> result|
|00002170| 5f 72 65 63 74 2e 72 69 | 67 68 74 20 2b 20 6f 66 |_rect.ri|ght + of|
|00002180| 66 5f 6c 65 66 74 20 29 | 0d 09 09 09 7b 0d 09 09 |f_left )|....{...|
|00002190| 09 09 6f 66 66 72 65 63 | 74 2e 72 69 67 68 74 20 |..offrec|t.right |
|000021a0| 3d 20 72 65 73 75 6c 74 | 5f 72 65 63 74 2e 72 69 |= result|_rect.ri|
|000021b0| 67 68 74 3b 0d 09 09 09 | 09 63 6c 69 70 70 65 72 |ght;....|.clipper|
|000021c0| 2e 72 69 67 68 74 20 3d | 20 72 65 73 75 6c 74 5f |.right =| result_|
|000021d0| 72 65 63 74 2e 72 69 67 | 68 74 20 2d 20 6f 66 66 |rect.rig|ht - off|
|000021e0| 5f 6c 65 66 74 3b 0d 09 | 09 09 7d 0d 0d 09 09 09 |_left;..|..}.....|
|000021f0| 48 4c 6f 63 6b 28 28 48 | 61 6e 64 6c 65 29 20 28 |HLock((H|andle) (|
|00002200| 72 65 73 75 6c 74 5f 62 | 6d 61 70 2d 3e 70 6f 72 |result_b|map->por|
|00002210| 74 50 69 78 4d 61 70 29 | 29 3b 0d 09 09 09 43 6f |tPixMap)|);....Co|
|00002220| 70 79 42 69 74 73 28 20 | 2a 28 72 65 73 75 6c 74 |pyBits( |*(result|
|00002230| 5f 62 6d 61 70 2d 3e 70 | 6f 72 74 50 69 78 4d 61 |_bmap->p|ortPixMa|
|00002240| 70 29 2c 20 26 74 68 65 | 50 6f 72 74 2d 3e 70 6f |p), &the|Port->po|
|00002250| 72 74 42 69 74 73 2c 20 | 0d 09 09 09 09 09 26 6f |rtBits, |......&o|
|00002260| 66 66 72 65 63 74 2c 20 | 26 63 6c 69 70 70 65 72 |ffrect, |&clipper|
|00002270| 2c 20 28 73 68 6f 72 74 | 29 20 73 72 63 43 6f 70 |, (short|) srcCop|
|00002280| 79 2c 20 0d 09 09 09 09 | 09 28 52 67 6e 48 61 6e |y, .....|.(RgnHan|
|00002290| 64 6c 65 29 20 4e 49 4c | 29 3b 0d 09 09 09 48 55 |dle) NIL|);....HU|
|000022a0| 6e 6c 6f 63 6b 28 28 48 | 61 6e 64 6c 65 29 20 28 |nlock((H|andle) (|
|000022b0| 72 65 73 75 6c 74 5f 62 | 6d 61 70 2d 3e 70 6f 72 |result_b|map->por|
|000022c0| 74 50 69 78 4d 61 70 29 | 29 3b 0d 09 09 7d 0d 09 |tPixMap)|);...}..|
|000022d0| 7d 0d 09 65 6c 73 65 0d | 09 7b 0d 09 09 53 65 74 |}..else.|.{...Set|
|000022e0| 4f 72 69 67 69 6e 20 28 | 6f 66 66 5f 6c 65 66 74 |Origin (|off_left|
|000022f0| 2c 20 6f 66 66 5f 74 6f | 70 29 3b 0d 09 09 66 6f |, off_to|p);...fo|
|00002300| 72 20 28 20 69 20 3d 20 | 30 3b 20 69 20 3c 20 61 |r ( i = |0; i < a|
|00002310| 6c 6c 5f 6d 79 5f 63 6f | 6c 6f 72 73 3b 20 69 2b |ll_my_co|lors; i+|
|00002320| 2b 29 0d 09 09 7b 0d 09 | 09 09 50 6d 46 6f 72 65 |+)...{..|..PmFore|
|00002330| 43 6f 6c 6f 72 28 20 69 | 20 29 3b 0d 09 09 09 4d |Color( i| );....M|
|00002340| 6f 76 65 54 6f 28 20 30 | 2c 20 69 20 29 3b 0d 09 |oveTo( 0|, i );..|
|00002350| 09 09 4c 69 6e 65 54 6f | 28 20 33 30 30 2c 20 69 |..LineTo|( 300, i|
|00002360| 20 29 3b 0d 09 09 7d 0d | 09 09 53 65 74 4f 72 69 | );...}.|..SetOri|
|00002370| 67 69 6e 20 28 30 2c 20 | 30 29 3b 0d 09 7d 0d 09 |gin (0, |0);..}..|
|00002380| 43 6c 69 70 52 65 63 74 | 28 20 26 52 65 73 75 6c |ClipRect|( &Resul|
|00002390| 74 5f 57 69 6e 64 6f 77 | 2d 3e 70 6f 72 74 52 65 |t_Window|->portRe|
|000023a0| 63 74 20 29 3b 0d 7d 0d | 0d 2f 2a 20 45 6e 64 20 |ct );.}.|./* End |
|000023b0| 6f 66 20 55 70 44 61 74 | 65 20 2a 2f 0d 0d 2f 2a |of UpDat|e */../*|
|000023c0| 20 20 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d | ======|========|
|000023d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000023e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 20 20 2a |========|===== *|
|000023f0| 2f 0d 2f 2a 20 76 65 72 | 74 69 63 61 6c 20 73 63 |/./* ver|tical sc|
|00002400| 72 6f 6c 6c 20 62 61 72 | 20 2a 2f 0d 0d 73 74 61 |roll bar| */..sta|
|00002410| 74 69 63 20 76 6f 69 64 | 20 48 61 6e 64 6c 65 56 |tic void| HandleV|
|00002420| 53 63 72 6f 6c 6c 42 61 | 72 20 28 63 6f 64 65 2c |ScrollBa|r (code,|
|00002430| 20 53 74 61 72 74 2c 20 | 53 74 6f 70 2c 20 49 6e | Start, |Stop, In|
|00002440| 63 72 65 6d 65 6e 74 2c | 20 4c 49 6e 63 72 65 6d |crement,| LIncrem|
|00002450| 65 6e 74 2c 0d 09 09 09 | 09 09 09 09 20 20 74 68 |ent,....|.... th|
|00002460| 65 43 6f 6e 74 72 6f 6c | 2c 20 6d 79 50 74 29 0d |eControl|, myPt).|
|00002470| 09 73 68 6f 72 74 20 63 | 6f 64 65 3b 09 09 09 09 |.short c|ode;....|
|00002480| 09 2f 2a 20 20 53 65 6c | 65 63 74 69 6f 6e 20 63 |./* Sel|ection c|
|00002490| 6f 64 65 20 66 6f 72 20 | 70 61 72 74 20 6f 66 20 |ode for |part of |
|000024a0| 73 63 72 6f 6c 6c 20 62 | 61 72 20 20 2a 2f 0d 09 |scroll b|ar */..|
|000024b0| 73 68 6f 72 74 20 53 74 | 61 72 74 3b 09 09 09 09 |short St|art;....|
|000024c0| 2f 2a 20 20 4d 69 6e 69 | 6d 75 6d 20 76 61 6c 75 |/* Mini|mum valu|
|000024d0| 65 20 74 68 65 20 73 63 | 72 6f 6c 6c 20 62 61 72 |e the sc|roll bar|
|000024e0| 20 63 61 6e 20 61 73 73 | 75 6d 65 20 2a 2f 0d 09 | can ass|ume */..|
|000024f0| 73 68 6f 72 74 20 53 74 | 6f 70 3b 09 09 09 09 09 |short St|op;.....|
|00002500| 2f 2a 20 20 4d 61 78 69 | 6d 75 6d 20 76 61 6c 75 |/* Maxi|mum valu|
|00002510| 65 20 74 68 65 20 73 63 | 72 6f 6c 6c 20 62 61 72 |e the sc|roll bar|
|00002520| 20 63 61 6e 20 61 73 73 | 75 6d 65 20 2a 2f 0d 09 | can ass|ume */..|
|00002530| 73 68 6f 72 74 20 4c 49 | 6e 63 72 65 6d 65 6e 74 |short LI|ncrement|
|00002540| 2c 20 49 6e 63 72 65 6d | 65 6e 74 3b 09 2f 2a 20 |, Increm|ent;./* |
|00002550| 20 49 6e 63 72 65 6d 65 | 6e 74 20 74 6f 20 6d 6f | Increme|nt to mo|
|00002560| 76 65 20 77 68 65 6e 20 | 70 72 65 73 73 65 64 20 |ve when |pressed |
|00002570| 69 6e 20 61 6e 2a 2f 0d | 09 43 6f 6e 74 72 6f 6c |in an*/.|.Control|
|00002580| 48 61 6e 64 6c 65 20 74 | 68 65 43 6f 6e 74 72 6f |Handle t|heContro|
|00002590| 6c 3b 09 2f 2a 20 20 48 | 61 6e 64 6c 65 20 74 6f |l;./* H|andle to|
|000025a0| 20 74 68 65 20 73 63 72 | 6f 6c 6c 20 62 61 72 20 | the scr|oll bar |
|000025b0| 63 6f 6e 74 72 6f 6c 20 | 2a 2f 0d 09 50 6f 69 6e |control |*/..Poin|
|000025c0| 74 20 6d 79 50 74 3b 09 | 09 09 09 09 2f 2a 20 20 |t myPt;.|..../* |
|000025d0| 52 65 74 75 72 6e 65 64 | 20 70 6f 69 6e 74 20 66 |Returned| point f|
|000025e0| 72 6f 6d 20 74 72 61 63 | 6b 20 74 68 65 20 73 63 |rom trac|k the sc|
|000025f0| 72 6f 6c 6c 62 61 72 20 | 2a 2f 0d 7b 09 09 09 09 |rollbar |*/.{....|
|00002600| 09 09 2f 2a 20 20 53 74 | 61 72 74 20 6f 66 20 74 |../* St|art of t|
|00002610| 68 69 73 20 66 75 6e 63 | 74 69 6f 6e 20 2a 2f 0d |his func|tion */.|
|00002620| 09 73 68 6f 72 74 20 74 | 68 65 56 61 6c 75 65 3b |.short t|heValue;|
|00002630| 09 09 09 2f 2a 20 20 56 | 61 6c 75 65 20 6f 66 20 |.../* V|alue of |
|00002640| 74 68 65 20 73 63 72 6f | 6c 6c 62 61 72 20 2a 2f |the scro|llbar */|
|00002650| 0d 09 6c 6f 6e 67 20 4d | 61 78 54 69 63 6b 3b 09 |..long M|axTick;.|
|00002660| 09 09 2f 2a 20 20 54 69 | 6d 65 72 20 75 73 65 64 |../* Ti|mer used|
|00002670| 20 66 6f 72 20 72 65 70 | 65 61 74 20 73 63 72 6f | for rep|eat scro|
|00002680| 6c 6c 69 6e 67 20 2a 2f | 0d 0d 09 64 6f 09 09 09 |lling */|...do...|
|00002690| 09 09 09 2f 2a 20 44 6f | 20 74 68 65 20 73 63 72 |.../* Do| the scr|
|000026a0| 6f 6c 6c 20 61 73 20 6c | 6f 6e 67 20 61 73 20 74 |oll as l|ong as t|
|000026b0| 68 65 20 62 75 74 74 6f | 6e 20 69 73 20 64 6f 2a |he butto|n is do*|
|000026c0| 2f 0d 09 7b 09 09 09 09 | 09 2f 2a 20 54 69 6d 65 |/..{....|./* Time|
|000026d0| 72 20 75 73 65 64 20 66 | 6f 72 20 72 65 70 65 61 |r used f|or repea|
|000026e0| 74 20 73 63 72 6f 6c 6c | 69 6e 67 20 2a 2f 0d 09 |t scroll|ing */..|
|000026f0| 09 48 69 6c 69 74 65 43 | 6f 6e 74 72 6f 6c 20 28 |.HiliteC|ontrol (|
|00002700| 74 68 65 43 6f 6e 74 72 | 6f 6c 2c 20 63 6f 64 65 |theContr|ol, code|
|00002710| 29 3b 09 2f 2a 20 44 61 | 72 6b 65 6e 20 74 68 65 |);./* Da|rken the|
|00002720| 20 61 72 72 6f 77 20 2a | 2f 0d 09 09 74 68 65 56 | arrow *|/...theV|
|00002730| 61 6c 75 65 20 3d 20 47 | 65 74 43 74 6c 56 61 6c |alue = G|etCtlVal|
|00002740| 75 65 20 28 74 68 65 43 | 6f 6e 74 72 6f 6c 29 3b |ue (theC|ontrol);|
|00002750| 09 2f 2a 20 47 65 74 20 | 63 75 72 72 65 6e 74 20 |./* Get |current |
|00002760| 73 74 61 74 65 20 2a 2f | 0d 0d 09 09 69 66 20 28 |state */|....if (|
|00002770| 63 6f 64 65 20 3d 3d 20 | 69 6e 55 70 42 75 74 74 |code == |inUpButt|
|00002780| 6f 6e 29 09 2f 2a 20 53 | 65 65 20 69 66 20 69 6e |on)./* S|ee if in|
|00002790| 20 74 68 65 20 55 70 20 | 61 72 72 6f 77 20 2a 2f | the Up |arrow */|
|000027a0| 0d 09 09 7b 0d 09 09 09 | 74 68 65 56 61 6c 75 65 |...{....|theValue|
|000027b0| 20 3d 20 74 68 65 56 61 | 6c 75 65 20 2d 20 49 6e | = theVa|lue - In|
|000027c0| 63 72 65 6d 65 6e 74 3b | 09 2f 2a 20 53 75 62 74 |crement;|./* Subt|
|000027d0| 72 61 63 74 20 74 68 65 | 20 73 69 6e 67 6c 65 20 |ract the| single |
|000027e0| 64 2a 2f 0d 09 09 09 69 | 66 20 28 74 68 65 56 61 |d*/....i|f (theVa|
|000027f0| 6c 75 65 20 3c 20 53 74 | 61 72 74 29 09 2f 2a 20 |lue < St|art)./* |
|00002800| 43 68 65 63 6b 20 66 6f | 72 20 62 6f 75 6e 64 61 |Check fo|r bounda|
|00002810| 72 79 20 63 6f 6e 64 69 | 74 69 6f 6e 73 20 2a 2f |ry condi|tions */|
|00002820| 0d 09 09 09 09 74 68 65 | 56 61 6c 75 65 20 3d 20 |.....the|Value = |
|00002830| 53 74 61 72 74 3b 09 2f | 2a 20 50 69 6e 20 61 74 |Start;./|* Pin at|
|00002840| 20 74 68 65 20 73 74 61 | 72 74 20 76 61 6c 75 65 | the sta|rt value|
|00002850| 20 2a 2f 0d 09 09 7d 0d | 0d 09 09 69 66 20 28 63 | */...}.|...if (c|
|00002860| 6f 64 65 20 3d 3d 20 69 | 6e 44 6f 77 6e 42 75 74 |ode == i|nDownBut|
|00002870| 74 6f 6e 29 09 2f 2a 20 | 53 65 65 20 69 66 20 69 |ton)./* |See if i|
|00002880| 6e 20 74 68 65 20 44 6f | 77 6e 20 61 72 72 6f 77 |n the Do|wn arrow|
|00002890| 20 2a 2f 0d 09 09 7b 0d | 09 09 09 74 68 65 56 61 | */...{.|...theVa|
|000028a0| 6c 75 65 20 3d 20 74 68 | 65 56 61 6c 75 65 20 2b |lue = th|eValue +|
|000028b0| 20 49 6e 63 72 65 6d 65 | 6e 74 3b 09 2f 2a 20 41 | Increme|nt;./* A|
|000028c0| 64 64 20 74 68 65 20 73 | 69 6e 67 6c 65 20 64 65 |dd the s|ingle de|
|000028d0| 63 72 65 6d 2a 2f 0d 09 | 09 09 69 66 20 28 74 68 |crem*/..|..if (th|
|000028e0| 65 56 61 6c 75 65 20 3e | 20 53 74 6f 70 29 09 2f |eValue >| Stop)./|
|000028f0| 2a 20 43 68 65 63 6b 20 | 66 6f 72 20 62 6f 75 6e |* Check |for boun|
|00002900| 64 61 72 79 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 |dary con|ditions |
|00002910| 2a 2f 0d 09 09 09 09 74 | 68 65 56 61 6c 75 65 20 |*/.....t|heValue |
|00002920| 3d 20 53 74 6f 70 3b 09 | 2f 2a 20 50 69 6e 20 61 |= Stop;.|/* Pin a|
|00002930| 74 20 74 68 65 20 73 74 | 6f 70 20 76 61 6c 75 65 |t the st|op value|
|00002940| 20 2a 2f 0d 09 09 7d 0d | 0d 09 09 69 66 20 28 63 | */...}.|...if (c|
|00002950| 6f 64 65 20 3d 3d 20 69 | 6e 50 61 67 65 55 70 29 |ode == i|nPageUp)|
|00002960| 09 2f 2a 20 53 65 65 20 | 69 66 20 69 6e 20 74 68 |./* See |if in th|
|00002970| 65 20 75 70 2f 6c 65 66 | 74 20 67 72 65 79 20 61 |e up/lef|t grey a|
|00002980| 72 65 61 20 2a 2f 0d 09 | 09 7b 0d 09 09 09 74 68 |rea */..|.{....th|
|00002990| 65 56 61 6c 75 65 20 3d | 20 74 68 65 56 61 6c 75 |eValue =| theValu|
|000029a0| 65 20 2d 20 4c 49 6e 63 | 72 65 6d 65 6e 74 3b 09 |e - LInc|rement;.|
|000029b0| 2f 2a 20 53 75 62 74 72 | 61 63 74 20 74 68 65 20 |/* Subtr|act the |
|000029c0| 70 61 67 65 20 69 6e 63 | 2a 2f 0d 09 09 09 69 66 |page inc|*/....if|
|000029d0| 20 28 74 68 65 56 61 6c | 75 65 20 3c 20 53 74 61 | (theVal|ue < Sta|
|000029e0| 72 74 29 09 2f 2a 20 43 | 68 65 63 6b 20 66 6f 72 |rt)./* C|heck for|
|000029f0| 20 62 6f 75 6e 64 61 72 | 79 20 63 6f 6e 64 69 74 | boundar|y condit|
|00002a00| 69 6f 6e 73 20 2a 2f 0d | 09 09 09 09 74 68 65 56 |ions */.|....theV|
|00002a10| 61 6c 75 65 20 3d 20 53 | 74 61 72 74 3b 09 2f 2a |alue = S|tart;./*|
|00002a20| 20 50 69 6e 20 61 74 20 | 74 68 65 20 53 74 61 72 | Pin at |the Star|
|00002a30| 74 20 76 61 6c 75 65 20 | 2a 2f 0d 09 09 7d 0d 0d |t value |*/...}..|
|00002a40| 09 09 69 66 20 28 63 6f | 64 65 20 3d 3d 20 69 6e |..if (co|de == in|
|00002a50| 50 61 67 65 44 6f 77 6e | 29 09 2f 2a 20 53 65 65 |PageDown|)./* See|
|00002a60| 20 69 66 20 69 6e 20 74 | 68 65 20 64 6f 77 6e 2f | if in t|he down/|
|00002a70| 72 69 67 68 74 20 67 72 | 65 79 20 61 72 65 61 20 |right gr|ey area |
|00002a80| 2a 2f 0d 09 09 7b 0d 09 | 09 09 74 68 65 56 61 6c |*/...{..|..theVal|
|00002a90| 75 65 20 3d 20 74 68 65 | 56 61 6c 75 65 20 2b 20 |ue = the|Value + |
|00002aa0| 4c 49 6e 63 72 65 6d 65 | 6e 74 3b 09 2f 2a 20 41 |LIncreme|nt;./* A|
|00002ab0| 64 64 20 74 68 65 20 70 | 61 67 65 20 69 6e 63 72 |dd the p|age incr|
|00002ac0| 65 6d 65 6e 2a 2f 0d 09 | 09 09 69 66 20 28 74 68 |emen*/..|..if (th|
|00002ad0| 65 56 61 6c 75 65 20 3e | 20 53 74 6f 70 29 09 2f |eValue >| Stop)./|
|00002ae0| 2a 20 43 68 65 63 6b 20 | 66 6f 72 20 62 6f 75 6e |* Check |for boun|
|00002af0| 64 61 72 79 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 |dary con|ditions |
|00002b00| 2a 2f 0d 09 09 09 09 74 | 68 65 56 61 6c 75 65 20 |*/.....t|heValue |
|00002b10| 3d 20 53 74 6f 70 3b 09 | 2f 2a 20 50 69 6e 20 61 |= Stop;.|/* Pin a|
|00002b20| 74 20 74 68 65 20 53 74 | 6f 70 20 76 61 6c 75 65 |t the St|op value|
|00002b30| 20 2a 2f 0d 09 09 7d 0d | 0d 09 09 69 66 20 28 63 | */...}.|...if (c|
|00002b40| 6f 64 65 20 3d 3d 20 69 | 6e 54 68 75 6d 62 29 09 |ode == i|nThumb).|
|00002b50| 2f 2a 20 53 65 65 20 69 | 66 20 69 6e 20 74 68 65 |/* See i|f in the|
|00002b60| 20 64 72 61 67 20 62 6f | 78 20 61 72 65 61 20 2a | drag bo|x area *|
|00002b70| 2f 0d 09 09 7b 0d 09 09 | 09 63 6f 64 65 20 3d 20 |/...{...|.code = |
|00002b80| 54 72 61 63 6b 43 6f 6e | 74 72 6f 6c 20 28 74 68 |TrackCon|trol (th|
|00002b90| 65 43 6f 6e 74 72 6f 6c | 2c 20 6d 79 50 74 2c 20 |eControl|, myPt, |
|00002ba0| 4e 49 4c 29 3b 09 2f 2a | 20 4c 65 74 20 74 68 65 |NIL);./*| Let the|
|00002bb0| 20 4f 2a 2f 0d 09 09 09 | 74 68 65 56 61 6c 75 65 | O*/....|theValue|
|00002bc0| 20 3d 20 47 65 74 43 74 | 6c 56 61 6c 75 65 20 28 | = GetCt|lValue (|
|00002bd0| 74 68 65 43 6f 6e 74 72 | 6f 6c 29 3b 09 2f 2a 20 |theContr|ol);./* |
|00002be0| 47 65 74 20 63 75 72 72 | 65 6e 74 20 73 74 61 74 |Get curr|ent stat|
|00002bf0| 65 2a 2f 0d 09 09 7d 0d | 0d 09 09 53 65 74 43 74 |e*/...}.|...SetCt|
|00002c00| 6c 56 61 6c 75 65 20 28 | 74 68 65 43 6f 6e 74 72 |lValue (|theContr|
|00002c10| 6f 6c 2c 20 74 68 65 56 | 61 6c 75 65 29 3b 09 2f |ol, theV|alue);./|
|00002c20| 2a 20 53 65 74 20 6e 65 | 77 20 73 74 61 74 65 20 |* Set ne|w state |
|00002c30| 2a 2f 0d 0d 09 09 6f 66 | 66 5f 74 6f 70 20 3d 20 |*/....of|f_top = |
|00002c40| 28 73 68 6f 72 74 29 20 | 28 20 28 64 6f 75 62 6c |(short) |( (doubl|
|00002c50| 65 29 28 72 65 73 75 6c | 74 5f 72 65 63 74 2e 62 |e)(resul|t_rect.b|
|00002c60| 6f 74 74 6f 6d 20 2d 20 | 72 65 73 75 6c 74 5f 72 |ottom - |result_r|
|00002c70| 65 63 74 2e 74 6f 70 29 | 20 2a 20 28 64 6f 75 62 |ect.top)| * (doub|
|00002c80| 6c 65 29 20 74 68 65 56 | 61 6c 75 65 0d 09 09 09 |le) theV|alue....|
|00002c90| 2f 20 28 64 6f 75 62 6c | 65 29 20 28 53 74 6f 70 |/ (doubl|e) (Stop|
|00002ca0| 20 2d 20 53 74 61 72 74 | 29 20 29 3b 0d 0d 09 09 | - Start|) );....|
|00002cb0| 64 72 61 77 5f 72 65 73 | 75 6c 74 28 29 3b 0d 09 |draw_res|ult();..|
|00002cc0| 0d 09 09 4d 61 78 54 69 | 63 6b 20 3d 20 54 69 63 |...MaxTi|ck = Tic|
|00002cd0| 6b 43 6f 75 6e 74 20 28 | 29 20 2b 20 39 3b 09 2f |kCount (|) + 9;./|
|00002ce0| 2a 20 54 69 6d 65 20 64 | 65 6c 61 79 20 66 6f 72 |* Time d|elay for|
|00002cf0| 20 61 75 74 6f 2d 73 63 | 72 6f 6c 6c 20 2a 2f 0d | auto-sc|roll */.|
|00002d00| 09 09 64 6f 09 2f 2a 20 | 53 74 61 72 74 20 6f 66 |..do./* |Start of|
|00002d10| 20 64 65 6c 61 79 20 72 | 6f 75 74 69 6e 65 20 2a | delay r|outine *|
|00002d20| 2f 0d 09 09 7b 20 2f 2a | 20 53 70 69 6e 20 6f 6e |/...{ /*| Spin on|
|00002d30| 20 64 6f 69 6e 67 20 6e | 6f 74 68 69 6e 67 20 2a | doing n|othing *|
|00002d40| 2f 0d 09 09 7d 20 77 68 | 69 6c 65 20 28 28 42 75 |/...} wh|ile ((Bu|
|00002d50| 74 74 6f 6e 20 28 29 20 | 3d 3d 20 54 52 55 45 29 |tton () |== TRUE)|
|00002d60| 20 26 26 20 28 54 69 63 | 6b 43 6f 75 6e 74 20 28 | && (Tic|kCount (|
|00002d70| 29 20 3c 3d 20 4d 61 78 | 54 69 63 6b 29 29 3b 09 |) <= Max|Tick));.|
|00002d80| 2f 2a 20 45 2a 2f 0d 0d | 09 09 48 69 6c 69 74 65 |/* E*/..|..Hilite|
|00002d90| 43 6f 6e 74 72 6f 6c 20 | 28 74 68 65 43 6f 6e 74 |Control |(theCont|
|00002da0| 72 6f 6c 2c 20 30 29 3b | 09 2f 2a 20 4c 69 67 68 |rol, 0);|./* Ligh|
|00002db0| 74 65 6e 20 74 68 65 20 | 61 72 72 6f 77 20 2a 2f |ten the |arrow */|
|00002dc0| 0d 09 7d 09 09 09 09 09 | 2f 2a 20 45 6e 64 20 66 |..}.....|/* End f|
|00002dd0| 6f 72 20 53 74 69 6c 6c | 44 6f 77 6e 20 2a 2f 0d |or Still|Down */.|
|00002de0| 09 77 68 69 6c 65 20 28 | 53 74 69 6c 6c 44 6f 77 |.while (|StillDow|
|00002df0| 6e 20 28 29 20 3d 3d 20 | 54 52 55 45 29 3b 09 2f |n () == |TRUE);./|
|00002e00| 2a 20 45 6e 64 20 66 6f | 72 20 53 74 69 6c 6c 44 |* End fo|r StillD|
|00002e10| 6f 77 6e 20 2a 2f 0d 7d | 0d 0d 2f 2a 20 45 6e 64 |own */.}|../* End|
|00002e20| 20 66 6f 72 20 48 61 6e | 64 6c 65 56 53 63 72 6f | for Han|dleVScro|
|00002e30| 6c 6c 42 61 72 20 2a 2f | 0d 0d 2f 2a 20 3d 3d 3d |llBar */|../* ===|
|00002e40| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002e50| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002e60| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002e70| 3d 3d 3d 20 2a 2f 0d 0d | 2f 2a 20 68 6f 72 69 7a |=== */..|/* horiz|
|00002e80| 6f 6e 74 61 6c 20 73 63 | 72 6f 6c 6c 20 62 61 72 |ontal sc|roll bar|
|00002e90| 20 2a 2f 0d 0d 73 74 61 | 74 69 63 20 76 6f 69 64 | */..sta|tic void|
|00002ea0| 20 48 61 6e 64 6c 65 48 | 53 63 72 6f 6c 6c 42 61 | HandleH|ScrollBa|
|00002eb0| 72 20 28 63 6f 64 65 2c | 20 53 74 61 72 74 2c 20 |r (code,| Start, |
|00002ec0| 53 74 6f 70 2c 20 49 6e | 63 72 65 6d 65 6e 74 2c |Stop, In|crement,|
|00002ed0| 20 4c 49 6e 63 72 65 6d | 65 6e 74 2c 0d 09 09 09 | LIncrem|ent,....|
|00002ee0| 09 09 09 09 20 20 74 68 | 65 43 6f 6e 74 72 6f 6c |.... th|eControl|
|00002ef0| 2c 20 6d 79 50 74 29 0d | 09 73 68 6f 72 74 20 63 |, myPt).|.short c|
|00002f00| 6f 64 65 3b 09 09 09 09 | 09 2f 2a 20 20 53 65 6c |ode;....|./* Sel|
|00002f10| 65 63 74 69 6f 6e 20 63 | 6f 64 65 20 66 6f 72 20 |ection c|ode for |
|00002f20| 70 61 72 74 20 6f 66 20 | 73 63 72 6f 6c 6c 20 62 |part of |scroll b|
|00002f30| 61 72 20 20 2a 2f 0d 09 | 73 68 6f 72 74 20 53 74 |ar */..|short St|
|00002f40| 61 72 74 3b 09 09 09 09 | 2f 2a 20 20 4d 69 6e 69 |art;....|/* Mini|
|00002f50| 6d 75 6d 20 76 61 6c 75 | 65 20 74 68 65 20 73 63 |mum valu|e the sc|
|00002f60| 72 6f 6c 6c 20 62 61 72 | 20 63 61 6e 20 61 73 73 |roll bar| can ass|
|00002f70| 75 6d 65 20 2a 2f 0d 09 | 73 68 6f 72 74 20 53 74 |ume */..|short St|
|00002f80| 6f 70 3b 09 09 09 09 09 | 2f 2a 20 20 4d 61 78 69 |op;.....|/* Maxi|
|00002f90| 6d 75 6d 20 76 61 6c 75 | 65 20 74 68 65 20 73 63 |mum valu|e the sc|
|00002fa0| 72 6f 6c 6c 20 62 61 72 | 20 63 61 6e 20 61 73 73 |roll bar| can ass|
|00002fb0| 75 6d 65 20 2a 2f 0d 09 | 73 68 6f 72 74 20 4c 49 |ume */..|short LI|
|00002fc0| 6e 63 72 65 6d 65 6e 74 | 2c 20 49 6e 63 72 65 6d |ncrement|, Increm|
|00002fd0| 65 6e 74 3b 09 2f 2a 20 | 20 49 6e 63 72 65 6d 65 |ent;./* | Increme|
|00002fe0| 6e 74 20 74 6f 20 6d 6f | 76 65 20 77 68 65 6e 20 |nt to mo|ve when |
|00002ff0| 70 72 65 73 73 65 64 20 | 69 6e 20 61 6e 2a 2f 0d |pressed |in an*/.|
|00003000| 09 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 20 74 |.Control|Handle t|
|00003010| 68 65 43 6f 6e 74 72 6f | 6c 3b 09 2f 2a 20 20 48 |heContro|l;./* H|
|00003020| 61 6e 64 6c 65 20 74 6f | 20 74 68 65 20 73 63 72 |andle to| the scr|
|00003030| 6f 6c 6c 20 62 61 72 20 | 63 6f 6e 74 72 6f 6c 20 |oll bar |control |
|00003040| 2a 2f 0d 09 50 6f 69 6e | 74 20 6d 79 50 74 3b 09 |*/..Poin|t myPt;.|
|00003050| 09 09 09 09 2f 2a 20 20 | 52 65 74 75 72 6e 65 64 |..../* |Returned|
|00003060| 20 70 6f 69 6e 74 20 66 | 72 6f 6d 20 74 72 61 63 | point f|rom trac|
|00003070| 6b 20 74 68 65 20 73 63 | 72 6f 6c 6c 62 61 72 20 |k the sc|rollbar |
|00003080| 2a 2f 0d 7b 09 09 09 09 | 09 09 2f 2a 20 20 53 74 |*/.{....|../* St|
|00003090| 61 72 74 20 6f 66 20 74 | 68 69 73 20 66 75 6e 63 |art of t|his func|
|000030a0| 74 69 6f 6e 20 2a 2f 0d | 09 73 68 6f 72 74 20 74 |tion */.|.short t|
|000030b0| 68 65 56 61 6c 75 65 3b | 09 09 09 2f 2a 20 20 56 |heValue;|.../* V|
|000030c0| 61 6c 75 65 20 6f 66 20 | 74 68 65 20 73 63 72 6f |alue of |the scro|
|000030d0| 6c 6c 62 61 72 20 2a 2f | 0d 09 6c 6f 6e 67 20 4d |llbar */|..long M|
|000030e0| 61 78 54 69 63 6b 3b 09 | 09 09 2f 2a 20 20 54 69 |axTick;.|../* Ti|
|000030f0| 6d 65 72 20 75 73 65 64 | 20 66 6f 72 20 72 65 70 |mer used| for rep|
|00003100| 65 61 74 20 73 63 72 6f | 6c 6c 69 6e 67 20 2a 2f |eat scro|lling */|
|00003110| 0d 0d 09 64 6f 09 09 09 | 09 09 09 2f 2a 20 44 6f |...do...|.../* Do|
|00003120| 20 74 68 65 20 73 63 72 | 6f 6c 6c 20 61 73 20 6c | the scr|oll as l|
|00003130| 6f 6e 67 20 61 73 20 74 | 68 65 20 62 75 74 74 6f |ong as t|he butto|
|00003140| 6e 20 69 73 20 64 6f 2a | 2f 0d 09 7b 09 09 09 09 |n is do*|/..{....|
|00003150| 09 2f 2a 20 54 69 6d 65 | 72 20 75 73 65 64 20 66 |./* Time|r used f|
|00003160| 6f 72 20 72 65 70 65 61 | 74 20 73 63 72 6f 6c 6c |or repea|t scroll|
|00003170| 69 6e 67 20 2a 2f 0d 09 | 09 48 69 6c 69 74 65 43 |ing */..|.HiliteC|
|00003180| 6f 6e 74 72 6f 6c 20 28 | 74 68 65 43 6f 6e 74 72 |ontrol (|theContr|
|00003190| 6f 6c 2c 20 63 6f 64 65 | 29 3b 09 2f 2a 20 44 61 |ol, code|);./* Da|
|000031a0| 72 6b 65 6e 20 74 68 65 | 20 61 72 72 6f 77 20 2a |rken the| arrow *|
|000031b0| 2f 0d 09 09 74 68 65 56 | 61 6c 75 65 20 3d 20 47 |/...theV|alue = G|
|000031c0| 65 74 43 74 6c 56 61 6c | 75 65 20 28 74 68 65 43 |etCtlVal|ue (theC|
|000031d0| 6f 6e 74 72 6f 6c 29 3b | 09 2f 2a 20 47 65 74 20 |ontrol);|./* Get |
|000031e0| 63 75 72 72 65 6e 74 20 | 73 74 61 74 65 20 2a 2f |current |state */|
|000031f0| 0d 0d 09 09 69 66 20 28 | 63 6f 64 65 20 3d 3d 20 |....if (|code == |
|00003200| 69 6e 55 70 42 75 74 74 | 6f 6e 29 09 2f 2a 20 53 |inUpButt|on)./* S|
|00003210| 65 65 20 69 66 20 69 6e | 20 74 68 65 20 55 70 20 |ee if in| the Up |
|00003220| 61 72 72 6f 77 20 2a 2f | 0d 09 09 7b 0d 09 09 09 |arrow */|...{....|
|00003230| 74 68 65 56 61 6c 75 65 | 20 3d 20 74 68 65 56 61 |theValue| = theVa|
|00003240| 6c 75 65 20 2d 20 49 6e | 63 72 65 6d 65 6e 74 3b |lue - In|crement;|
|00003250| 09 2f 2a 20 53 75 62 74 | 72 61 63 74 20 74 68 65 |./* Subt|ract the|
|00003260| 20 73 69 6e 67 6c 65 20 | 64 2a 2f 0d 09 09 09 69 | single |d*/....i|
|00003270| 66 20 28 74 68 65 56 61 | 6c 75 65 20 3c 20 53 74 |f (theVa|lue < St|
|00003280| 61 72 74 29 09 2f 2a 20 | 43 68 65 63 6b 20 66 6f |art)./* |Check fo|
|00003290| 72 20 62 6f 75 6e 64 61 | 72 79 20 63 6f 6e 64 69 |r bounda|ry condi|
|000032a0| 74 69 6f 6e 73 20 2a 2f | 0d 09 09 09 09 74 68 65 |tions */|.....the|
|000032b0| 56 61 6c 75 65 20 3d 20 | 53 74 61 72 74 3b 09 2f |Value = |Start;./|
|000032c0| 2a 20 50 69 6e 20 61 74 | 20 74 68 65 20 73 74 61 |* Pin at| the sta|
|000032d0| 72 74 20 76 61 6c 75 65 | 20 2a 2f 0d 09 09 7d 0d |rt value| */...}.|
|000032e0| 0d 09 09 69 66 20 28 63 | 6f 64 65 20 3d 3d 20 69 |...if (c|ode == i|
|000032f0| 6e 44 6f 77 6e 42 75 74 | 74 6f 6e 29 09 2f 2a 20 |nDownBut|ton)./* |
|00003300| 53 65 65 20 69 66 20 69 | 6e 20 74 68 65 20 44 6f |See if i|n the Do|
|00003310| 77 6e 20 61 72 72 6f 77 | 20 2a 2f 0d 09 09 7b 0d |wn arrow| */...{.|
|00003320| 09 09 09 74 68 65 56 61 | 6c 75 65 20 3d 20 74 68 |...theVa|lue = th|
|00003330| 65 56 61 6c 75 65 20 2b | 20 49 6e 63 72 65 6d 65 |eValue +| Increme|
|00003340| 6e 74 3b 09 2f 2a 20 41 | 64 64 20 74 68 65 20 73 |nt;./* A|dd the s|
|00003350| 69 6e 67 6c 65 20 64 65 | 63 72 65 6d 2a 2f 0d 09 |ingle de|crem*/..|
|00003360| 09 09 69 66 20 28 74 68 | 65 56 61 6c 75 65 20 3e |..if (th|eValue >|
|00003370| 20 53 74 6f 70 29 09 2f | 2a 20 43 68 65 63 6b 20 | Stop)./|* Check |
|00003380| 66 6f 72 20 62 6f 75 6e | 64 61 72 79 20 63 6f 6e |for boun|dary con|
|00003390| 64 69 74 69 6f 6e 73 20 | 2a 2f 0d 09 09 09 09 74 |ditions |*/.....t|
|000033a0| 68 65 56 61 6c 75 65 20 | 3d 20 53 74 6f 70 3b 09 |heValue |= Stop;.|
|000033b0| 2f 2a 20 50 69 6e 20 61 | 74 20 74 68 65 20 73 74 |/* Pin a|t the st|
|000033c0| 6f 70 20 76 61 6c 75 65 | 20 2a 2f 0d 09 09 7d 0d |op value| */...}.|
|000033d0| 0d 09 09 69 66 20 28 63 | 6f 64 65 20 3d 3d 20 69 |...if (c|ode == i|
|000033e0| 6e 50 61 67 65 55 70 29 | 09 2f 2a 20 53 65 65 20 |nPageUp)|./* See |
|000033f0| 69 66 20 69 6e 20 74 68 | 65 20 75 70 2f 6c 65 66 |if in th|e up/lef|
|00003400| 74 20 67 72 65 79 20 61 | 72 65 61 20 2a 2f 0d 09 |t grey a|rea */..|
|00003410| 09 7b 0d 09 09 09 74 68 | 65 56 61 6c 75 65 20 3d |.{....th|eValue =|
|00003420| 20 74 68 65 56 61 6c 75 | 65 20 2d 20 4c 49 6e 63 | theValu|e - LInc|
|00003430| 72 65 6d 65 6e 74 3b 09 | 2f 2a 20 53 75 62 74 72 |rement;.|/* Subtr|
|00003440| 61 63 74 20 74 68 65 20 | 70 61 67 65 20 69 6e 63 |act the |page inc|
|00003450| 2a 2f 0d 09 09 09 69 66 | 20 28 74 68 65 56 61 6c |*/....if| (theVal|
|00003460| 75 65 20 3c 20 53 74 61 | 72 74 29 09 2f 2a 20 43 |ue < Sta|rt)./* C|
|00003470| 68 65 63 6b 20 66 6f 72 | 20 62 6f 75 6e 64 61 72 |heck for| boundar|
|00003480| 79 20 63 6f 6e 64 69 74 | 69 6f 6e 73 20 2a 2f 0d |y condit|ions */.|
|00003490| 09 09 09 09 74 68 65 56 | 61 6c 75 65 20 3d 20 53 |....theV|alue = S|
|000034a0| 74 61 72 74 3b 09 2f 2a | 20 50 69 6e 20 61 74 20 |tart;./*| Pin at |
|000034b0| 74 68 65 20 53 74 61 72 | 74 20 76 61 6c 75 65 20 |the Star|t value |
|000034c0| 2a 2f 0d 09 09 7d 0d 0d | 09 09 69 66 20 28 63 6f |*/...}..|..if (co|
|000034d0| 64 65 20 3d 3d 20 69 6e | 50 61 67 65 44 6f 77 6e |de == in|PageDown|
|000034e0| 29 09 2f 2a 20 53 65 65 | 20 69 66 20 69 6e 20 74 |)./* See| if in t|
|000034f0| 68 65 20 64 6f 77 6e 2f | 72 69 67 68 74 20 67 72 |he down/|right gr|
|00003500| 65 79 20 61 72 65 61 20 | 2a 2f 0d 09 09 7b 0d 09 |ey area |*/...{..|
|00003510| 09 09 74 68 65 56 61 6c | 75 65 20 3d 20 74 68 65 |..theVal|ue = the|
|00003520| 56 61 6c 75 65 20 2b 20 | 4c 49 6e 63 72 65 6d 65 |Value + |LIncreme|
|00003530| 6e 74 3b 09 2f 2a 20 41 | 64 64 20 74 68 65 20 70 |nt;./* A|dd the p|
|00003540| 61 67 65 20 69 6e 63 72 | 65 6d 65 6e 2a 2f 0d 09 |age incr|emen*/..|
|00003550| 09 09 69 66 20 28 74 68 | 65 56 61 6c 75 65 20 3e |..if (th|eValue >|
|00003560| 20 53 74 6f 70 29 09 2f | 2a 20 43 68 65 63 6b 20 | Stop)./|* Check |
|00003570| 66 6f 72 20 62 6f 75 6e | 64 61 72 79 20 63 6f 6e |for boun|dary con|
|00003580| 64 69 74 69 6f 6e 73 20 | 2a 2f 0d 09 09 09 09 74 |ditions |*/.....t|
|00003590| 68 65 56 61 6c 75 65 20 | 3d 20 53 74 6f 70 3b 09 |heValue |= Stop;.|
|000035a0| 2f 2a 20 50 69 6e 20 61 | 74 20 74 68 65 20 53 74 |/* Pin a|t the St|
|000035b0| 6f 70 20 76 61 6c 75 65 | 20 2a 2f 0d 09 09 7d 0d |op value| */...}.|
|000035c0| 0d 09 09 69 66 20 28 63 | 6f 64 65 20 3d 3d 20 69 |...if (c|ode == i|
|000035d0| 6e 54 68 75 6d 62 29 09 | 2f 2a 20 53 65 65 20 69 |nThumb).|/* See i|
|000035e0| 66 20 69 6e 20 74 68 65 | 20 64 72 61 67 20 62 6f |f in the| drag bo|
|000035f0| 78 20 61 72 65 61 20 2a | 2f 0d 09 09 7b 0d 09 09 |x area *|/...{...|
|00003600| 09 63 6f 64 65 20 3d 20 | 54 72 61 63 6b 43 6f 6e |.code = |TrackCon|
|00003610| 74 72 6f 6c 20 28 74 68 | 65 43 6f 6e 74 72 6f 6c |trol (th|eControl|
|00003620| 2c 20 6d 79 50 74 2c 20 | 4e 49 4c 29 3b 09 2f 2a |, myPt, |NIL);./*|
|00003630| 20 4c 65 74 20 74 68 65 | 20 4f 2a 2f 0d 09 09 09 | Let the| O*/....|
|00003640| 74 68 65 56 61 6c 75 65 | 20 3d 20 47 65 74 43 74 |theValue| = GetCt|
|00003650| 6c 56 61 6c 75 65 20 28 | 74 68 65 43 6f 6e 74 72 |lValue (|theContr|
|00003660| 6f 6c 29 3b 09 2f 2a 20 | 47 65 74 20 63 75 72 72 |ol);./* |Get curr|
|00003670| 65 6e 74 20 73 74 61 74 | 65 2a 2f 0d 09 09 7d 0d |ent stat|e*/...}.|
|00003680| 0d 09 09 53 65 74 43 74 | 6c 56 61 6c 75 65 20 28 |...SetCt|lValue (|
|00003690| 74 68 65 43 6f 6e 74 72 | 6f 6c 2c 20 74 68 65 56 |theContr|ol, theV|
|000036a0| 61 6c 75 65 29 3b 09 2f | 2a 20 53 65 74 20 6e 65 |alue);./|* Set ne|
|000036b0| 77 20 73 74 61 74 65 20 | 2a 2f 0d 0d 09 09 6f 66 |w state |*/....of|
|000036c0| 66 5f 6c 65 66 74 20 3d | 20 28 73 68 6f 72 74 29 |f_left =| (short)|
|000036d0| 20 28 20 28 64 6f 75 62 | 6c 65 29 28 72 65 73 75 | ( (doub|le)(resu|
|000036e0| 6c 74 5f 72 65 63 74 2e | 62 6f 74 74 6f 6d 20 2d |lt_rect.|bottom -|
|000036f0| 20 72 65 73 75 6c 74 5f | 72 65 63 74 2e 74 6f 70 | result_|rect.top|
|00003700| 29 20 2a 20 28 64 6f 75 | 62 6c 65 29 20 74 68 65 |) * (dou|ble) the|
|00003710| 56 61 6c 75 65 0d 09 09 | 09 2f 20 28 64 6f 75 62 |Value...|./ (doub|
|00003720| 6c 65 29 20 28 53 74 6f | 70 20 2d 20 53 74 61 72 |le) (Sto|p - Star|
|00003730| 74 29 20 29 3b 0d 0d 09 | 09 64 72 61 77 5f 72 65 |t) );...|.draw_re|
|00003740| 73 75 6c 74 28 29 3b 0d | 0d 09 09 4d 61 78 54 69 |sult();.|...MaxTi|
|00003750| 63 6b 20 3d 20 54 69 63 | 6b 43 6f 75 6e 74 20 28 |ck = Tic|kCount (|
|00003760| 29 20 2b 20 39 3b 09 2f | 2a 20 54 69 6d 65 20 64 |) + 9;./|* Time d|
|00003770| 65 6c 61 79 20 66 6f 72 | 20 61 75 74 6f 2d 73 63 |elay for| auto-sc|
|00003780| 72 6f 6c 6c 20 2a 2f 0d | 09 09 64 6f 09 2f 2a 20 |roll */.|..do./* |
|00003790| 53 74 61 72 74 20 6f 66 | 20 64 65 6c 61 79 20 72 |Start of| delay r|
|000037a0| 6f 75 74 69 6e 65 20 2a | 2f 0d 09 09 7b 20 2f 2a |outine *|/...{ /*|
|000037b0| 20 53 70 69 6e 20 6f 6e | 20 64 6f 69 6e 67 20 6e | Spin on| doing n|
|000037c0| 6f 74 68 69 6e 67 20 2a | 2f 0d 09 09 7d 20 77 68 |othing *|/...} wh|
|000037d0| 69 6c 65 20 28 28 42 75 | 74 74 6f 6e 20 28 29 20 |ile ((Bu|tton () |
|000037e0| 3d 3d 20 54 52 55 45 29 | 20 26 26 20 28 54 69 63 |== TRUE)| && (Tic|
|000037f0| 6b 43 6f 75 6e 74 20 28 | 29 20 3c 3d 20 4d 61 78 |kCount (|) <= Max|
|00003800| 54 69 63 6b 29 29 3b 09 | 2f 2a 20 45 2a 2f 0d 0d |Tick));.|/* E*/..|
|00003810| 09 09 48 69 6c 69 74 65 | 43 6f 6e 74 72 6f 6c 20 |..Hilite|Control |
|00003820| 28 74 68 65 43 6f 6e 74 | 72 6f 6c 2c 20 30 29 3b |(theCont|rol, 0);|
|00003830| 09 2f 2a 20 4c 69 67 68 | 74 65 6e 20 74 68 65 20 |./* Ligh|ten the |
|00003840| 61 72 72 6f 77 20 2a 2f | 0d 09 7d 09 09 09 09 09 |arrow */|..}.....|
|00003850| 2f 2a 20 45 6e 64 20 66 | 6f 72 20 53 74 69 6c 6c |/* End f|or Still|
|00003860| 44 6f 77 6e 20 2a 2f 0d | 09 77 68 69 6c 65 20 28 |Down */.|.while (|
|00003870| 53 74 69 6c 6c 44 6f 77 | 6e 20 28 29 20 3d 3d 20 |StillDow|n () == |
|00003880| 54 52 55 45 29 3b 09 2f | 2a 20 45 6e 64 20 66 6f |TRUE);./|* End fo|
|00003890| 72 20 53 74 69 6c 6c 44 | 6f 77 6e 20 2a 2f 0d 7d |r StillD|own */.}|
|000038a0| 0d 0d 2f 2a 20 45 6e 64 | 20 66 6f 72 20 48 61 6e |../* End| for Han|
|000038b0| 64 6c 65 48 53 63 72 6f | 6c 6c 42 61 72 20 2a 2f |dleHScro|llBar */|
|000038c0| 0d 0d 73 74 61 74 69 63 | 20 76 6f 69 64 20 44 6f |..static| void Do|
|000038d0| 5f 41 5f 53 63 72 6f 6c | 6c 42 61 72 20 28 63 6f |_A_Scrol|lBar (co|
|000038e0| 64 65 2c 20 74 68 65 43 | 6f 6e 74 72 6f 6c 2c 20 |de, theC|ontrol, |
|000038f0| 6d 79 50 74 29 09 2f 2a | 20 48 61 6e 64 6c 65 20 |myPt)./*| Handle |
|00003900| 61 20 53 63 72 6f 6c 6c | 42 61 2a 2f 0d 09 73 68 |a Scroll|Ba*/..sh|
|00003910| 6f 72 74 20 63 6f 64 65 | 3b 09 09 09 09 09 2f 2a |ort code|;...../*|
|00003920| 20 57 68 69 63 68 20 70 | 6c 61 63 65 20 69 6e 20 | Which p|lace in |
|00003930| 73 63 72 6f 6c 6c 62 61 | 72 20 77 61 73 20 70 72 |scrollba|r was pr|
|00003940| 65 73 73 65 64 20 2a 2f | 0d 09 43 6f 6e 74 72 6f |essed */|..Contro|
|00003950| 6c 48 61 6e 64 6c 65 20 | 74 68 65 43 6f 6e 74 72 |lHandle |theContr|
|00003960| 6f 6c 3b 09 2f 2a 20 57 | 68 69 63 68 20 70 6c 61 |ol;./* W|hich pla|
|00003970| 63 65 20 69 6e 20 73 63 | 72 6f 6c 6c 62 61 72 20 |ce in sc|rollbar |
|00003980| 77 61 73 20 70 72 65 73 | 73 65 64 20 2a 2f 0d 09 |was pres|sed */..|
|00003990| 50 6f 69 6e 74 20 6d 79 | 50 74 3b 09 09 09 09 09 |Point my|Pt;.....|
|000039a0| 2f 2a 20 57 68 65 72 65 | 20 74 68 65 20 73 63 72 |/* Where| the scr|
|000039b0| 6f 6c 6c 62 61 72 20 77 | 61 73 20 70 72 65 73 73 |ollbar w|as press|
|000039c0| 65 64 20 2a 2f 0d 7b 09 | 09 09 09 09 09 2f 2a 20 |ed */.{.|...../* |
|000039d0| 53 74 61 72 74 20 6f 66 | 20 61 20 53 63 72 6f 6c |Start of| a Scrol|
|000039e0| 6c 42 61 72 20 62 65 69 | 6e 67 20 70 72 65 73 73 |lBar bei|ng press|
|000039f0| 65 64 20 2a 2f 0d 09 73 | 68 6f 72 74 20 52 65 66 |ed */..s|hort Ref|
|00003a00| 43 6f 6e 3b 0d 0d 09 52 | 65 66 43 6f 6e 20 3d 20 |Con;...R|efCon = |
|00003a10| 47 65 74 43 52 65 66 43 | 6f 6e 20 28 74 68 65 43 |GetCRefC|on (theC|
|00003a20| 6f 6e 74 72 6f 6c 29 3b | 09 2f 2a 20 67 65 74 20 |ontrol);|./* get |
|00003a30| 63 6f 6e 74 72 6f 6c 20 | 72 65 66 63 6f 6e 20 2a |control |refcon *|
|00003a40| 2f 0d 0d 09 73 77 69 74 | 63 68 20 28 52 65 66 43 |/...swit|ch (RefC|
|00003a50| 6f 6e 29 09 09 09 2f 2a | 20 53 65 6c 65 63 74 20 |on).../*| Select |
|00003a60| 63 6f 72 72 65 63 74 20 | 73 63 72 6f 6c 6c 62 61 |correct |scrollba|
|00003a70| 72 20 2a 2f 0d 09 7b 09 | 09 09 09 09 2f 2a 53 74 |r */..{.|..../*St|
|00003a80| 61 72 74 20 63 6f 72 72 | 65 63 74 20 73 63 72 6f |art corr|ect scro|
|00003a90| 6c 6c 62 61 72 20 2a 2f | 0d 09 63 61 73 65 20 49 |llbar */|..case I|
|00003aa0| 5f 56 65 72 74 69 63 61 | 6c 5f 53 63 72 6f 6c 6c |_Vertica|l_Scroll|
|00003ab0| 5f 62 61 72 3a 09 2f 2a | 20 56 65 72 74 69 63 61 |_bar:./*| Vertica|
|00003ac0| 6c 20 53 63 72 6f 6c 6c | 20 62 61 72 2c 20 73 63 |l Scroll| bar, sc|
|00003ad0| 72 6f 6c 6c 20 62 61 72 | 20 2a 2f 0d 09 09 48 61 |roll bar| */...Ha|
|00003ae0| 6e 64 6c 65 56 53 63 72 | 6f 6c 6c 42 61 72 20 28 |ndleVScr|ollBar (|
|00003af0| 63 6f 64 65 2c 20 6d 69 | 6e 5f 73 63 72 6f 6c 6c |code, mi|n_scroll|
|00003b00| 2c 20 6d 61 78 5f 73 63 | 72 6f 6c 6c 2c 20 73 6d |, max_sc|roll, sm|
|00003b10| 61 6c 6c 5f 73 74 65 70 | 2c 20 6c 61 72 67 65 5f |all_step|, large_|
|00003b20| 73 74 65 70 2c 20 74 68 | 65 43 6f 6e 74 72 6f 6c |step, th|eControl|
|00003b30| 2c 20 6d 79 50 74 29 3b | 09 2f 2a 20 63 2a 2f 0d |, myPt);|./* c*/.|
|00003b40| 09 09 62 72 65 61 6b 3b | 09 09 09 09 2f 2a 20 45 |..break;|..../* E|
|00003b50| 6e 64 20 66 6f 72 20 68 | 61 6e 64 6c 69 6e 67 20 |nd for h|andling |
|00003b60| 61 20 73 63 72 6f 6c 6c | 20 62 61 72 20 2a 2f 0d |a scroll| bar */.|
|00003b70| 0d 09 63 61 73 65 20 49 | 5f 48 6f 72 69 7a 5f 53 |..case I|_Horiz_S|
|00003b80| 63 72 6f 6c 6c 5f 62 61 | 72 3a 09 2f 2a 20 48 6f |croll_ba|r:./* Ho|
|00003b90| 72 69 7a 20 53 63 72 6f | 6c 6c 20 62 61 72 2c 20 |riz Scro|ll bar, |
|00003ba0| 73 63 72 6f 6c 6c 20 62 | 61 72 20 2a 2f 0d 09 09 |scroll b|ar */...|
|00003bb0| 48 61 6e 64 6c 65 48 53 | 63 72 6f 6c 6c 42 61 72 |HandleHS|crollBar|
|00003bc0| 20 28 63 6f 64 65 2c 20 | 6d 69 6e 5f 73 63 72 6f | (code, |min_scro|
|00003bd0| 6c 6c 2c 20 6d 61 78 5f | 73 63 72 6f 6c 6c 2c 20 |ll, max_|scroll, |
|00003be0| 73 6d 61 6c 6c 5f 73 74 | 65 70 2c 20 6c 61 72 67 |small_st|ep, larg|
|00003bf0| 65 5f 73 74 65 70 2c 20 | 74 68 65 43 6f 6e 74 72 |e_step, |theContr|
|00003c00| 6f 6c 2c 20 6d 79 50 74 | 29 3b 09 2f 2a 20 63 2a |ol, myPt|);./* c*|
|00003c10| 2f 0d 09 09 62 72 65 61 | 6b 3b 09 09 09 09 2f 2a |/...brea|k;..../*|
|00003c20| 20 45 6e 64 20 66 6f 72 | 20 68 61 6e 64 6c 69 6e | End for| handlin|
|00003c30| 67 20 61 20 73 63 72 6f | 6c 6c 20 62 61 72 20 2a |g a scro|ll bar *|
|00003c40| 2f 0d 0d 09 64 65 66 61 | 75 6c 74 3a 09 09 09 09 |/...defa|ult:....|
|00003c50| 2f 2a 20 61 6c 6c 6f 77 | 20 6f 74 68 65 72 20 73 |/* allow| other s|
|00003c60| 63 72 6f 6c 6c 62 61 72 | 73 20 28 6c 69 73 74 73 |crollbar|s (lists|
|00003c70| 29 2c 20 74 72 61 70 20 | 66 6f 72 20 2a 2f 0d 09 |), trap |for */..|
|00003c80| 09 62 72 65 61 6b 3b 09 | 09 09 09 2f 2a 20 65 6e |.break;.|.../* en|
|00003c90| 64 20 6f 66 20 64 65 66 | 61 75 6c 74 20 2a 2f 0d |d of def|ault */.|
|00003ca0| 09 7d 09 09 09 09 09 2f | 2a 20 65 6e 64 20 6f 66 |.}...../|* end of|
|00003cb0| 20 73 77 69 74 63 68 20 | 2a 2f 0d 7d 0d 0d 2f 2a | switch |*/.}../*|
|00003cc0| 20 48 61 6e 64 6c 65 20 | 61 20 53 63 72 6f 6c 6c | Handle |a Scroll|
|00003cd0| 42 61 72 20 62 65 69 6e | 67 20 70 72 65 73 73 65 |Bar bein|g presse|
|00003ce0| 64 20 2a 2f 0d 0d 2f 2a | 20 3d 3d 3d 3d 3d 3d 3d |d */../*| =======|
|00003cf0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003d00| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 20 2a 2f 0d 0d 2f |========|== */../|
|00003d10| 2a 20 4f 70 65 6e 20 6f | 75 72 20 77 69 6e 64 6f |* Open o|ur windo|
|00003d20| 77 20 61 6e 64 20 64 72 | 61 77 20 65 76 65 72 79 |w and dr|aw every|
|00003d30| 74 68 69 6e 67 20 2a 2f | 0d 76 6f 69 64 20 4f 70 |thing */|.void Op|
|00003d40| 65 6e 5f 52 65 73 75 6c | 74 20 28 29 0d 7b 0d 09 |en_Resul|t ().{..|
|00003d50| 73 68 6f 72 74 20 49 6e | 64 65 78 3b 0d 09 52 65 |short In|dex;..Re|
|00003d60| 63 74 20 64 61 74 61 42 | 6f 75 6e 64 73 3b 0d 09 |ct dataB|ounds;..|
|00003d70| 50 6f 69 6e 74 20 63 53 | 69 7a 65 3b 0d 0d 09 69 |Point cS|ize;...i|
|00003d80| 66 20 28 52 65 73 75 6c | 74 5f 57 69 6e 64 6f 77 |f (Resul|t_Window|
|00003d90| 20 3d 3d 20 4e 49 4c 29 | 0d 09 7b 0d 09 09 2f 2a | == NIL)|..{.../*|
|00003da0| 20 52 65 73 75 6c 74 5f | 57 69 6e 64 6f 77 20 3d | Result_|Window =|
|00003db0| 20 28 57 69 6e 64 6f 77 | 50 74 72 29 20 47 65 74 | (Window|Ptr) Get|
|00003dc0| 4e 65 77 43 57 69 6e 64 | 6f 77 20 28 31 30 2c 20 |NewCWind|ow (10, |
|00003dd0| 4e 49 4c 2c 20 28 57 69 | 6e 64 6f 77 50 74 72 29 |NIL, (Wi|ndowPtr)|
|00003de0| 20 2d 20 31 29 3b 20 2d | 2d 20 47 65 74 20 74 68 | - 1); -|- Get th|
|00003df0| 65 20 77 2a 2f 0d 0d 09 | 09 74 65 6d 70 52 65 63 |e w*/...|.tempRec|
|00003e00| 74 2e 74 6f 70 20 3d 20 | 31 33 39 3b 0d 09 09 74 |t.top = |139;...t|
|00003e10| 65 6d 70 52 65 63 74 2e | 62 6f 74 74 6f 6d 20 3d |empRect.|bottom =|
|00003e20| 20 33 33 34 3b 0d 09 09 | 74 65 6d 70 52 65 63 74 | 334;...|tempRect|
|00003e30| 2e 6c 65 66 74 20 3d 20 | 33 39 39 3b 0d 09 09 74 |.left = |399;...t|
|00003e40| 65 6d 70 52 65 63 74 2e | 72 69 67 68 74 20 3d 20 |empRect.|right = |
|00003e50| 35 39 30 3b 0d 09 09 52 | 65 73 75 6c 74 5f 57 69 |590;...R|esult_Wi|
|00003e60| 6e 64 6f 77 20 3d 20 28 | 57 69 6e 64 6f 77 50 74 |ndow = (|WindowPt|
|00003e70| 72 29 20 4e 65 77 43 57 | 69 6e 64 6f 77 28 20 28 |r) NewCW|indow( (|
|00003e80| 50 74 72 29 20 4e 49 4c | 2c 20 26 74 65 6d 70 52 |Ptr) NIL|, &tempR|
|00003e90| 65 63 74 2c 20 22 5c 70 | 52 65 73 75 6c 74 22 2c |ect, "\p|Result",|
|00003ea0| 0d 09 09 09 20 28 42 6f | 6f 6c 65 61 6e 29 20 74 |.... (Bo|olean) t|
|00003eb0| 72 75 65 2c 20 38 2c 20 | 28 57 69 6e 64 6f 77 50 |rue, 8, |(WindowP|
|00003ec0| 74 72 29 2d 31 2c 20 28 | 42 6f 6f 6c 65 61 6e 29 |tr)-1, (|Boolean)|
|00003ed0| 20 66 61 6c 73 65 2c 20 | 31 30 4c 29 3b 0d 0d 09 | false, |10L);...|
|00003ee0| 09 2f 2a 20 4d 6f 76 65 | 57 69 6e 64 6f 77 20 28 |./* Move|Window (|
|00003ef0| 52 65 73 75 6c 74 5f 57 | 69 6e 64 6f 77 2c 20 74 |Result_W|indow, t|
|00003f00| 65 6d 70 52 65 63 74 2e | 6c 65 66 74 2c 20 74 65 |empRect.|left, te|
|00003f10| 6d 70 52 65 63 74 2e 74 | 6f 70 2c 20 54 52 55 45 |mpRect.t|op, TRUE|
|00003f20| 29 3b 20 2a 2f 0d 0d 09 | 09 53 65 74 50 6f 72 74 |); */...|.SetPort|
|00003f30| 20 28 52 65 73 75 6c 74 | 5f 57 69 6e 64 6f 77 29 | (Result|_Window)|
|00003f40| 3b 0d 0d 09 09 2f 2a 20 | 20 4d 61 6b 65 20 61 20 |;..../* | Make a |
|00003f50| 73 63 72 6f 6c 6c 20 62 | 61 72 2c 20 56 65 72 74 |scroll b|ar, Vert|
|00003f60| 20 53 63 72 6f 6c 6c 20 | 62 61 72 20 20 20 2a 2f | Scroll |bar */|
|00003f70| 0d 09 09 53 63 72 6f 6c | 6c 56 48 61 6e 64 6c 65 |...Scrol|lVHandle|
|00003f80| 20 3d 20 47 65 74 4e 65 | 77 43 6f 6e 74 72 6f 6c | = GetNe|wControl|
|00003f90| 20 28 49 5f 56 65 72 74 | 69 63 61 6c 5f 53 63 72 | (I_Vert|ical_Scr|
|00003fa0| 6f 6c 6c 5f 62 61 72 2c | 20 52 65 73 75 6c 74 5f |oll_bar,| Result_|
|00003fb0| 57 69 6e 64 6f 77 29 3b | 0d 0d 09 09 2f 2a 20 20 |Window);|..../* |
|00003fc0| 4d 61 6b 65 20 61 20 73 | 63 72 6f 6c 6c 20 62 61 |Make a s|croll ba|
|00003fd0| 72 2c 20 48 6f 72 69 7a | 20 53 63 72 6f 6c 6c 20 |r, Horiz| Scroll |
|00003fe0| 62 61 72 20 20 20 2a 2f | 0d 0d 09 09 53 63 72 6f |bar */|....Scro|
|00003ff0| 6c 6c 48 48 61 6e 64 6c | 65 20 3d 20 47 65 74 4e |llHHandl|e = GetN|
|00004000| 65 77 43 6f 6e 74 72 6f | 6c 20 28 49 5f 48 6f 72 |ewContro|l (I_Hor|
|00004010| 69 7a 5f 53 63 72 6f 6c | 6c 5f 62 61 72 2c 20 52 |iz_Scrol|l_bar, R|
|00004020| 65 73 75 6c 74 5f 57 69 | 6e 64 6f 77 29 3b 0d 0d |esult_Wi|ndow);..|
|00004030| 09 09 53 68 6f 77 57 69 | 6e 64 6f 77 20 28 52 65 |..ShowWi|ndow (Re|
|00004040| 73 75 6c 74 5f 57 69 6e | 64 6f 77 29 3b 0d 09 09 |sult_Win|dow);...|
|00004050| 53 65 6c 65 63 74 57 69 | 6e 64 6f 77 20 28 52 65 |SelectWi|ndow (Re|
|00004060| 73 75 6c 74 5f 57 69 6e | 64 6f 77 29 3b 0d 0d 09 |sult_Win|dow);...|
|00004070| 09 2f 2a 20 53 65 74 50 | 61 6c 65 74 74 65 28 20 |./* SetP|alette( |
|00004080| 52 65 73 75 6c 74 5f 57 | 69 6e 64 6f 77 2c 20 6d |Result_W|indow, m|
|00004090| 79 70 61 6c 65 74 74 65 | 2c 20 74 72 75 65 29 3b |ypalette|, true);|
|000040a0| 20 2a 2f 0d 09 09 2f 2a | 20 52 47 42 42 61 63 6b | */.../*| RGBBack|
|000040b0| 43 6f 6c 6f 72 28 26 77 | 68 69 74 65 52 47 42 29 |Color(&w|hiteRGB)|
|000040c0| 3b 20 2a 2f 0d 09 09 2f | 2a 20 52 47 42 46 6f 72 |; */.../|* RGBFor|
|000040d0| 65 43 6f 6c 6f 72 28 26 | 42 6c 61 63 6b 52 47 42 |eColor(&|BlackRGB|
|000040e0| 29 3b 20 2d 2d 20 63 6f | 70 79 62 69 74 73 20 75 |); -- co|pybits u|
|000040f0| 73 75 61 6c 6c 79 20 65 | 78 70 65 63 74 20 62 6c |sually e|xpect bl|
|00004100| 61 63 6b 20 66 6f 72 65 | 20 61 6e 64 20 77 68 69 |ack fore| and whi|
|00004110| 74 65 20 62 61 63 6b 20 | 2a 2f 0d 09 09 2f 2a 20 |te back |*/.../* |
|00004120| 4f 70 43 6f 6c 6f 72 28 | 26 67 72 61 79 52 47 42 |OpColor(|&grayRGB|
|00004130| 29 3b 20 2a 2f 0d 0d 09 | 09 52 65 73 69 7a 65 64 |); */...|.Resized|
|00004140| 5f 52 65 73 75 6c 74 20 | 28 52 65 73 75 6c 74 5f |_Result |(Result_|
|00004150| 57 69 6e 64 6f 77 29 3b | 0d 09 7d 0d 09 65 6c 73 |Window);|..}..els|
|00004160| 65 0d 09 7b 0d 09 09 53 | 65 6c 65 63 74 57 69 6e |e..{...S|electWin|
|00004170| 64 6f 77 20 28 52 65 73 | 75 6c 74 5f 57 69 6e 64 |dow (Res|ult_Wind|
|00004180| 6f 77 29 3b 09 2f 2a 20 | 41 6c 72 65 61 64 79 20 |ow);./* |Already |
|00004190| 6f 70 65 6e 2c 20 73 6f | 20 73 68 6f 77 20 69 74 |open, so| show it|
|000041a0| 20 2a 2f 0d 09 7d 0d 7d | 0d 0d 2f 2a 20 45 6e 64 | */..}.}|../* End|
|000041b0| 20 6f 66 20 6f 70 65 6e | 20 66 75 6e 63 74 69 6f | of open| functio|
|000041c0| 6e 20 2a 2f 0d 0d 2f 2a | 20 3d 3d 3d 3d 3d 3d 3d |n */../*| =======|
|000041d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000041e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 20 2a 2f 0d 0d 2f |========|== */../|
|000041f0| 2a 20 48 61 6e 64 6c 65 | 20 61 63 74 69 6f 6e 20 |* Handle| action |
|00004200| 74 6f 20 6f 75 72 20 77 | 69 6e 64 6f 77 2c 20 6c |to our w|indow, l|
|00004210| 69 6b 65 20 63 6f 6e 74 | 72 6f 6c 73 20 2a 2f 0d |ike cont|rols */.|
|00004220| 76 6f 69 64 20 44 6f 5f | 52 65 73 75 6c 74 20 28 |void Do_|Result (|
|00004230| 6d 79 45 76 65 6e 74 29 | 0d 09 45 76 65 6e 74 52 |myEvent)|..EventR|
|00004240| 65 63 6f 72 64 20 2a 6d | 79 45 76 65 6e 74 3b 0d |ecord *m|yEvent;.|
|00004250| 7b 0d 09 73 68 6f 72 74 | 20 52 65 66 43 6f 6e 3b |{..short| RefCon;|
|00004260| 09 09 09 2f 2a 20 52 65 | 66 43 6f 6e 20 66 6f 72 |.../* Re|fCon for|
|00004270| 20 63 6f 6e 74 72 6f 6c | 73 20 2a 2f 0d 09 73 68 | control|s */..sh|
|00004280| 6f 72 74 20 63 6f 64 65 | 3b 09 09 09 09 2f 2a 20 |ort code|;..../* |
|00004290| 4c 6f 63 61 74 69 6f 6e | 20 6f 66 20 65 76 65 6e |Location| of even|
|000042a0| 74 20 69 6e 20 77 69 6e | 64 6f 77 20 6f 72 20 63 |t in win|dow or c|
|000042b0| 6f 6e 74 72 6f 6c 73 20 | 2a 2f 0d 09 73 68 6f 72 |ontrols |*/..shor|
|000042c0| 74 20 74 68 65 56 61 6c | 75 65 3b 09 09 09 2f 2a |t theVal|ue;.../*|
|000042d0| 20 43 75 72 72 65 6e 74 | 20 76 61 6c 75 65 20 6f | Current| value o|
|000042e0| 66 20 61 20 63 6f 6e 74 | 72 6f 6c 20 2a 2f 0d 09 |f a cont|rol */..|
|000042f0| 57 69 6e 64 6f 77 50 74 | 72 20 77 68 69 63 68 57 |WindowPt|r whichW|
|00004300| 69 6e 64 6f 77 3b 09 2f | 2a 20 57 69 6e 64 6f 77 |indow;./|* Window|
|00004310| 20 70 6f 69 6e 74 65 72 | 20 77 68 65 72 65 20 65 | pointer| where e|
|00004320| 76 65 6e 74 20 68 61 70 | 70 65 6e 65 64 20 2a 2f |vent hap|pened */|
|00004330| 0d 09 50 6f 69 6e 74 20 | 6d 79 50 74 3b 09 09 09 |..Point |myPt;...|
|00004340| 09 2f 2a 20 50 6f 69 6e | 74 20 77 68 65 72 65 20 |./* Poin|t where |
|00004350| 65 76 65 6e 74 20 68 61 | 70 70 65 6e 65 64 20 2a |event ha|ppened *|
|00004360| 2f 0d 09 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |/..Contr|olHandle|
|00004370| 20 74 68 65 43 6f 6e 74 | 72 6f 6c 3b 09 2f 2a 20 | theCont|rol;./* |
|00004380| 48 61 6e 64 6c 65 20 66 | 6f 72 20 61 20 63 6f 6e |Handle f|or a con|
|00004390| 74 72 6f 6c 20 2a 2f 0d | 09 57 69 6e 64 6f 77 50 |trol */.|.WindowP|
|000043a0| 74 72 20 53 61 76 65 50 | 6f 72 74 3b 0d 0d 09 2f |tr SaveP|ort;.../|
|000043b0| 2a 20 53 74 61 72 74 20 | 6f 66 20 57 69 6e 64 6f |* Start |of Windo|
|000043c0| 77 20 68 61 6e 64 6c 65 | 72 20 2a 2f 0d 09 69 66 |w handle|r */..if|
|000043d0| 20 28 52 65 73 75 6c 74 | 5f 57 69 6e 64 6f 77 20 | (Result|_Window |
|000043e0| 21 3d 20 4e 49 4c 29 09 | 2f 2a 20 48 61 6e 64 6c |!= NIL).|/* Handl|
|000043f0| 65 20 6f 6e 6c 79 20 77 | 68 65 6e 20 74 68 65 20 |e only w|hen the |
|00004400| 77 69 6e 64 6f 77 20 69 | 73 20 76 61 6c 69 64 20 |window i|s valid |
|00004410| 2a 2f 0d 09 7b 0d 09 09 | 47 65 74 50 6f 72 74 20 |*/..{...|GetPort |
|00004420| 28 26 53 61 76 65 50 6f | 72 74 29 3b 0d 09 09 53 |(&SavePo|rt);...S|
|00004430| 65 74 50 6f 72 74 28 52 | 65 73 75 6c 74 5f 57 69 |etPort(R|esult_Wi|
|00004440| 6e 64 6f 77 29 3b 0d 09 | 09 0d 09 09 53 65 74 4f |ndow);..|....SetO|
|00004450| 72 69 67 69 6e 28 30 2c | 20 30 29 3b 0d 09 0d 09 |rigin(0,| 0);....|
|00004460| 09 63 6f 64 65 20 3d 20 | 46 69 6e 64 57 69 6e 64 |.code = |FindWind|
|00004470| 6f 77 20 28 6d 79 45 76 | 65 6e 74 2d 3e 77 68 65 |ow (myEv|ent->whe|
|00004480| 72 65 2c 20 26 77 68 69 | 63 68 57 69 6e 64 6f 77 |re, &whi|chWindow|
|00004490| 29 3b 09 2f 2a 20 47 65 | 74 20 77 68 65 72 65 2a |);./* Ge|t where*|
|000044a0| 2f 0d 0d 09 09 69 66 20 | 28 28 6d 79 45 76 65 6e |/....if |((myEven|
|000044b0| 74 2d 3e 77 68 61 74 20 | 3d 3d 20 6d 6f 75 73 65 |t->what |== mouse|
|000044c0| 44 6f 77 6e 29 20 26 26 | 20 28 52 65 73 75 6c 74 |Down) &&| (Result|
|000044d0| 5f 57 69 6e 64 6f 77 20 | 3d 3d 20 77 68 69 63 68 |_Window |== which|
|000044e0| 57 69 6e 64 6f 77 29 29 | 0d 09 09 7b 0d 09 09 09 |Window))|...{....|
|000044f0| 6d 79 50 74 20 3d 20 6d | 79 45 76 65 6e 74 2d 3e |myPt = m|yEvent->|
|00004500| 77 68 65 72 65 3b 09 2f | 2a 20 47 65 74 20 6d 6f |where;./|* Get mo|
|00004510| 75 73 65 20 70 6f 73 69 | 74 69 6f 6e 20 2a 2f 0d |use posi|tion */.|
|00004520| 09 09 09 47 6c 6f 62 61 | 6c 54 6f 4c 6f 63 61 6c |...Globa|lToLocal|
|00004530| 20 28 26 6d 79 50 74 29 | 3b 09 2f 2a 20 4d 61 6b | (&myPt)|;./* Mak|
|00004540| 65 20 69 74 20 72 65 6c | 61 74 69 76 65 20 2a 2f |e it rel|ative */|
|00004550| 0d 09 09 7d 0d 0d 09 09 | 69 66 20 28 28 52 65 73 |...}....|if ((Res|
|00004560| 75 6c 74 5f 57 69 6e 64 | 6f 77 20 3d 3d 20 77 68 |ult_Wind|ow == wh|
|00004570| 69 63 68 57 69 6e 64 6f | 77 29 20 26 26 20 28 63 |ichWindo|w) && (c|
|00004580| 6f 64 65 20 3d 3d 20 69 | 6e 43 6f 6e 74 65 6e 74 |ode == i|nContent|
|00004590| 29 29 09 2f 2a 20 66 6f | 72 20 6f 2a 2f 0d 09 09 |))./* fo|r o*/...|
|000045a0| 7b 0d 0d 09 09 09 63 6f | 64 65 20 3d 20 46 69 6e |{.....co|de = Fin|
|000045b0| 64 43 6f 6e 74 72 6f 6c | 20 28 6d 79 50 74 2c 20 |dControl| (myPt, |
|000045c0| 77 68 69 63 68 57 69 6e | 64 6f 77 2c 20 26 74 68 |whichWin|dow, &th|
|000045d0| 65 43 6f 6e 74 72 6f 6c | 29 3b 09 2f 2a 20 47 2a |eControl|);./* G*|
|000045e0| 2f 0d 0d 09 09 09 69 66 | 20 28 28 63 6f 64 65 20 |/.....if| ((code |
|000045f0| 3d 3d 20 69 6e 55 70 42 | 75 74 74 6f 6e 29 20 7c |== inUpB|utton) ||
|00004600| 7c 20 28 63 6f 64 65 20 | 3d 3d 20 69 6e 44 6f 77 || (code |== inDow|
|00004610| 6e 42 75 74 74 6f 6e 29 | 0d 09 09 09 09 7c 7c 20 |nButton)|.....|| |
|00004620| 28 63 6f 64 65 20 3d 3d | 20 69 6e 54 68 75 6d 62 |(code ==| inThumb|
|00004630| 29 20 7c 7c 20 28 63 6f | 64 65 20 3d 3d 20 69 6e |) || (co|de == in|
|00004640| 50 61 67 65 44 6f 77 6e | 29 0d 09 09 09 09 7c 7c |PageDown|).....|||
|00004650| 20 28 63 6f 64 65 20 3d | 3d 20 69 6e 50 61 67 65 | (code =|= inPage|
|00004660| 55 70 29 29 0d 09 09 09 | 09 44 6f 5f 41 5f 53 63 |Up))....|.Do_A_Sc|
|00004670| 72 6f 6c 6c 42 61 72 20 | 28 63 6f 64 65 2c 20 74 |rollBar |(code, t|
|00004680| 68 65 43 6f 6e 74 72 6f | 6c 2c 20 6d 79 50 74 29 |heContro|l, myPt)|
|00004690| 3b 09 2f 2a 20 44 6f 20 | 73 63 72 6f 6c 6c 2a 2f |;./* Do |scroll*/|
|000046a0| 0d 09 09 09 69 66 20 28 | 63 6f 64 65 20 21 3d 20 |....if (|code != |
|000046b0| 30 29 09 2f 2a 20 43 68 | 65 63 6b 20 74 79 70 65 |0)./* Ch|eck type|
|000046c0| 20 6f 66 20 63 6f 6e 74 | 72 6f 6c 20 2a 2f 0d 09 | of cont|rol */..|
|000046d0| 09 09 09 63 6f 64 65 20 | 3d 20 54 72 61 63 6b 43 |...code |= TrackC|
|000046e0| 6f 6e 74 72 6f 6c 20 28 | 74 68 65 43 6f 6e 74 72 |ontrol (|theContr|
|000046f0| 6f 6c 2c 20 6d 79 50 74 | 2c 20 4e 49 4c 29 3b 09 |ol, myPt|, NIL);.|
|00004700| 2f 2a 20 54 72 61 63 6b | 2a 2f 0d 0d 09 09 7d 09 |/* Track|*/....}.|
|00004710| 09 09 09 2f 2a 20 45 6e | 64 20 66 6f 72 20 69 66 |.../* En|d for if|
|00004720| 20 28 52 65 73 75 6c 74 | 5f 57 69 6e 64 6f 77 3d | (Result|_Window=|
|00004730| 3d 77 68 69 63 68 57 69 | 6e 64 6f 77 29 20 2a 2f |=whichWi|ndow) */|
|00004740| 0d 09 7d 09 09 09 09 09 | 2f 2a 20 45 6e 64 20 66 |..}.....|/* End f|
|00004750| 6f 72 20 69 66 20 28 52 | 65 73 75 6c 74 5f 57 69 |or if (R|esult_Wi|
|00004760| 6e 64 6f 77 20 21 3d 20 | 4e 49 4c 29 20 2a 2f 0d |ndow != |NIL) */.|
|00004770| 09 53 65 74 50 6f 72 74 | 28 53 61 76 65 50 6f 72 |.SetPort|(SavePor|
|00004780| 74 29 3b 0d 7d 0d 0d 2f | 2a 20 45 6e 64 20 6f 66 |t);.}../|* End of|
|00004790| 20 66 75 6e 63 74 69 6f | 6e 20 2a 2f 0d 0d 2f 2a | functio|n */../*|
|000047a0| 20 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d | =======|========|
|000047b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000047c0| 3d 3d 20 2a 2f 0d 0d 76 | 6f 69 64 20 73 61 76 65 |== */..v|oid save|
|000047d0| 5f 72 65 73 75 6c 74 28 | 29 0d 2f 2a 20 73 61 76 |_result(|)./* sav|
|000047e0| 65 73 20 72 65 73 75 6c | 74 73 20 50 49 43 54 32 |es resul|ts PICT2|
|000047f0| 20 74 6f 20 61 20 50 49 | 43 54 20 66 69 6c 65 20 | to a PI|CT file |
|00004800| 2d 2d 20 63 61 6c 6c 65 | 64 20 77 68 65 6e 20 53 |-- calle|d when S|
|00004810| 41 56 45 20 50 49 43 54 | 20 6d 65 6e 75 20 69 74 |AVE PICT| menu it|
|00004820| 65 6d 20 63 68 6f 73 65 | 6e 20 2a 2f 0d 7b 0d 2f |em chose|n */.{./|
|00004830| 2a 09 63 68 65 63 6b 20 | 74 6f 20 73 65 65 20 69 |*.check |to see i|
|00004840| 66 20 74 68 65 72 65 20 | 69 73 20 61 20 72 65 73 |f there |is a res|
|00004850| 75 6c 74 2d 70 69 63 74 | 0d 09 69 66 20 6e 6f 74 |ult-pict|..if not|
|00004860| 2c 20 74 68 65 6e 20 62 | 65 65 70 0d 09 65 6c 73 |, then b|eep..els|
|00004870| 65 0d 09 09 70 75 74 20 | 75 70 20 73 61 76 65 20 |e...put |up save |
|00004880| 66 69 6c 65 73 20 64 69 | 61 6c 6f 67 0d 09 09 69 |files di|alog...i|
|00004890| 66 20 6e 6f 74 20 63 61 | 6e 63 65 6c 6c 65 64 20 |f not ca|ncelled |
|000048a0| 74 68 65 6e 0d 09 09 09 | 6f 70 65 6e 20 61 20 6e |then....|open a n|
|000048b0| 65 77 20 50 49 43 54 20 | 66 69 6c 65 0d 09 09 09 |ew PICT |file....|
|000048c0| 77 72 69 74 65 20 35 31 | 32 2d 62 79 74 65 20 65 |write 51|2-byte e|
|000048d0| 6d 70 74 79 20 68 65 61 | 64 65 72 0d 09 09 09 77 |mpty hea|der....w|
|000048e0| 72 69 74 65 20 74 68 65 | 20 50 49 43 54 20 66 72 |rite the| PICT fr|
|000048f0| 6f 6d 20 74 68 65 20 48 | 61 6e 64 6c 65 20 74 6f |om the H|andle to|
|00004900| 20 74 68 65 20 66 69 6c | 65 0d 09 09 65 6e 64 20 | the fil|e...end |
|00004910| 69 66 0d 09 65 6e 64 20 | 69 66 0d 2a 2f 0d 7d 0d |if..end |if.*/.}.|
|00004920| 0d 76 6f 69 64 20 63 6f | 70 79 5f 72 65 73 75 6c |.void co|py_resul|
|00004930| 74 28 29 0d 2f 2a 20 63 | 6f 70 79 73 20 61 20 50 |t()./* c|opys a P|
|00004940| 49 43 54 20 66 72 6f 6d | 20 74 68 65 20 72 65 73 |ICT from| the res|
|00004950| 75 6c 74 20 70 69 78 6d | 61 70 20 69 6e 74 6f 20 |ult pixm|ap into |
|00004960| 74 68 65 20 63 6c 69 70 | 62 6f 61 72 64 20 2a 2f |the clip|board */|
|00004970| 0d 7b 0d 09 73 68 6f 72 | 74 20 65 72 72 3b 0d 09 |.{..shor|t err;..|
|00004980| 0d 09 69 66 20 28 20 72 | 65 73 75 6c 74 5f 70 69 |..if ( r|esult_pi|
|00004990| 63 20 21 3d 20 4e 49 4c | 20 29 0d 09 7b 0d 20 20 |c != NIL| )..{. |
|000049a0| 20 20 09 48 4c 6f 63 6b | 28 20 28 48 61 6e 64 6c | .HLock|( (Handl|
|000049b0| 65 29 20 72 65 73 75 6c | 74 5f 70 69 63 20 29 3b |e) resul|t_pic );|
|000049c0| 0d 20 20 20 20 09 65 72 | 72 20 3d 20 50 75 74 53 |. .er|r = PutS|
|000049d0| 63 72 61 70 28 20 47 65 | 74 48 61 6e 64 6c 65 53 |crap( Ge|tHandleS|
|000049e0| 69 7a 65 28 20 28 48 61 | 6e 64 6c 65 29 72 65 73 |ize( (Ha|ndle)res|
|000049f0| 75 6c 74 5f 70 69 63 20 | 29 2c 20 27 50 49 43 54 |ult_pic |), 'PICT|
|00004a00| 27 2c 20 2a 72 65 73 75 | 6c 74 5f 70 69 63 29 3b |', *resu|lt_pic);|
|00004a10| 0d 20 20 20 20 09 48 55 | 6e 6c 6f 63 6b 28 20 28 |. .HU|nlock( (|
|00004a20| 48 61 6e 64 6c 65 29 20 | 72 65 73 75 6c 74 5f 70 |Handle) |result_p|
|00004a30| 69 63 20 29 3b 0d 09 7d | 0d 7d 0d 0d 76 6f 69 64 |ic );..}|.}..void|
|00004a40| 20 63 75 74 5f 72 65 73 | 75 6c 74 28 29 0d 2f 2a | cut_res|ult()./*|
|00004a50| 20 63 6f 70 79 73 20 61 | 20 50 49 43 54 20 66 72 | copys a| PICT fr|
|00004a60| 6f 6d 20 74 68 65 20 72 | 65 73 75 6c 74 20 70 69 |om the r|esult pi|
|00004a70| 78 6d 61 70 20 69 6e 74 | 6f 20 74 68 65 20 63 6c |xmap int|o the cl|
|00004a80| 69 70 62 6f 61 72 64 2c | 20 61 6e 64 20 74 68 65 |ipboard,| and the|
|00004a90| 6e 20 63 6c 65 61 72 73 | 20 74 68 65 20 70 69 78 |n clears| the pix|
|00004aa0| 6d 61 70 20 2a 2f 0d 7b | 0d 0d 7d 0d 0d 76 6f 69 |map */.{|..}..voi|
|00004ab0| 64 20 63 6c 65 61 72 5f | 72 65 73 75 6c 74 28 29 |d clear_|result()|
|00004ac0| 0d 7b 0d 0d 7d 0d 0d 76 | 6f 69 64 20 63 72 6f 70 |.{..}..v|oid crop|
|00004ad0| 5f 72 65 73 75 6c 74 28 | 29 0d 7b 0d 0d 7d 00 00 |_result(|).{..}..|
|00004ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b00| 00 00 01 00 00 00 01 16 | 00 00 00 16 00 00 00 46 |........|.......F|
|00004b10| 72 43 65 6c 6c 20 00 01 | 00 2a 00 00 08 e4 00 00 |rCell ..|.*......|
|00004b20| 00 0c 08 73 00 01 00 32 | 00 00 08 e8 00 00 00 08 |...s...2|........|
|00004b30| 08 52 65 73 75 6c 74 2e | 63 73 02 00 00 00 54 45 |.Result.|cs....TE|
|00004b40| 58 54 4b 41 48 4c 01 00 | 00 c0 00 c0 00 00 00 00 |XTKAHL..|........|
|00004b50| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 c0 00 c0 |..TEXTKA|HL......|
|00004b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b70| 00 00 a0 ba 8d 48 00 00 | 4a 5e 00 00 01 5c 08 fc |.....H..|J^...\..|
|00004b80| 00 00 1b 2e 00 00 00 01 | 00 6a 00 00 09 04 00 00 |........|.j......|
|00004b90| 0b 48 00 00 00 01 00 72 | 00 00 07 94 00 00 00 08 |.H.....r|........|
|00004ba0| 07 4d 00 01 00 7a 00 00 | 09 0c 00 0c 00 00 00 00 |.M...z..|........|
|00004bb0| 00 01 00 82 00 00 09 14 | 00 00 00 00 00 08 00 01 |........|........|
|00004bc0| 00 8a 00 00 09 10 00 00 | 00 00 00 00 00 01 00 92 |........|........|
|00004bd0| 00 00 09 00 00 00 00 00 | 00 0e 00 01 00 9a 00 00 |........|........|
|00004be0| 09 18 00 00 00 00 20 62 | 00 01 00 a2 00 00 08 ec |...... b|........|
|00004bf0| 00 00 00 00 00 00 00 01 | 00 aa 00 00 07 a4 6c 6c |........|......ll|
|00004c00| 00 00 00 04 00 06 00 04 | 00 00 00 0a 00 09 07 4d |........|.......M|
|00004c10| 6f 6e 61 63 6f 44 00 00 | 01 00 00 00 01 16 00 00 |onacoD..|........|
|00004c20| 00 16 00 00 00 46 00 36 | 64 ec 06 40 00 00 00 1c |.....F.6|d..@....|
|00004c30| 00 46 00 01 45 54 41 42 | 00 00 00 12 45 46 4e 54 |.F..ETAB|....EFNT|
|00004c40| 00 00 00 1e 03 ec ff ff | 00 00 00 00 00 36 63 ec |........|.....6c.|
|00004c50| 03 eb ff ff 00 00 00 08 | 00 36 63 34 00 00 00 00 |........|.6c4....|
|00004c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+